I’m trying to load a spritesheet in MicroPython like so:
x = 60
y = 60
my_sprites = Buffer(128, 128)
open(“invader.16bpp”, “rb”).readinto(my_sprites)
spritesheet(my_sprites)
def update(tick): **
** global x
** global y**
# pass
** if button(RIGHT):**
** x += 2**
** if button(LEFT):**
** x -= 2 **
def draw(tick):
** pen(0, 0, 0)**
** clear()**
** pen(0, 15, 0)**
** cursor(20, 20)**
** text(“Hello World”)**
** #flip()**
** pen(15, 0, 15)**
** fcircle(x, y, 5) **
start()pen(15, 0, 15)
** fcircle(x, y, 5) **
start()
and I’m getting this error:
Traceback (most recent call last):
** File “”, line 11, in **
OSError: [Errno 2] ENOENT
I have created a .16bpp file named and even tried one of the example .16bpp files, I still get the same error
Also I’m trying to display a sprite with:
sprite()
but I can’t find the syntax for what goes in the parenthesis in the documentation. (x, y, sprite number?) not sure?
Thanks,
Brian