Skip to main content

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

VariableDescription
i2cAn instance of busio.I2C, specific to Stemi Shield, official docs
requestsAn instance of adafruit_requests.Session official docs
buttonsAn instance of Buttons, explained here
configA python dictionary containing config.json explained here
asyncioA python module, result of import asyncio, provides the user with one globally defined task loop official docs

Overriden functions

VariableDescription
evalForbidden function, that just outputs "You, shall not pass!"
execForbidden function, that just outputs "You, shall not pass!"
openForbidden function, that just outputs "You, shall not pass!"
printProvides 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