new Image Scroll problem

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Jason Kim
Posts: 10
Joined: Sun Jan 01, 2017 3:07 pm

new Image Scroll problem

Postby Jason Kim » Tue Jan 03, 2017 12:12 pm

I am looking for ways to create and scroll a new image.
And I wrote the this code. But there is a problem.

Code: Select all

from microbit import *

image = Image(
    "090900:"
    "090909:"
    "090909:"
    "090909:"
    "090909:")
 
def my_scroll(image) :
      for x in range(image.width()) :
           yield image.crop(x, 0, 5, 5) <- understand!
display.show(my_scroll(image))

and then result is

Code: Select all

Allocation in interrupt handlerTraceback (most recent all last):
  File "<stdin>", line 15, in <module>
MemoryError

Is there a way to solve this problem?
why is that happen to me.... :(

Return to “General Discussion and Questions”

Who is online

Users browsing this forum: No registered users and 5 guests