Runtime
Stemi Shield creates a runtime environment for user code.
This environment consists of providing a few of globally
defined variables along with overriding some functions.
A few of these (Buttons, config) will be explained in
a later chapter.
Provided global variables
| Variable | Description |
|---|---|
i2c | An instance of busio.I2C, specific to Stemi Shield, official docs |
requests | An instance of adafruit_requests.Session official docs |
buttons | An instance of Buttons, explained here |
config | A python dictionary containing config.json explained here |
asyncio | A python module, result of import asyncio, provides the user with one globally defined task loop official docs |
Overriden functions
| Variable | Description |
|---|---|
eval | Forbidden function, that just outputs "You, shall not pass!" |
exec | Forbidden function, that just outputs "You, shall not pass!" |
open | Forbidden function, that just outputs "You, shall not pass!" |
print | Provides functionality of regular print in addition to printing to display and to Stemi Editor's terminal |
Splash screen
If the display is connected, you may see an inverted text display (white background, black text). That is the splash being shown, currently it's used to show the device reconnecting if wifi connection was lost. It will dissapear on it's own after 5 seconds.
Advanced // TODO, see if can mark by docosaurus to hide?
It's async yo! xD