You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing the screen is the most important part of the library. Luckily, it's fairly simple to use. All you need to access is:
The screen. This is under Spryg.screen and is actually just a MicroPython framebuffer. You can perform all screen actions on it as described in the FrameBuffer Docs.
The flipping. This is the function Spryg.flip, and when called it will update the screen of the Spryg with the changes you've made to the screen. If you don't run this, the screen won't work.
Optionally, the backlight. This is highly recommended because without it the screen is very hard to see. You can access it with Spryg.backlight. It's just a MicroPython pin, so to turn it on and off you call Spryg.backlight.on and Spryg.backlight.off.
Here's an example of using the screen to show some text with a neat shadow effect:
game.py
defrun(spryg):
spryg.screen.text("Hello from Spryg!", 1, 1, 0x00F8) # Shadowspryg.screen.text("Hello from Spryg!", 0, 0, 0xFFFF) # Main textspryg.flip() # Update the screen