This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

thingz.thingz_button

Thingz button

class thingz.thingz_button.Button

Control Galaxia’s physical buttons

is_pressed() bool
Returns:

True if button is pressed, False otherwise

Return type:

bool

was_pressed() bool
Returns:

True if button has been pressed since last call, False otherwise

Return type:

bool

get_presses() int

Get the number of presses since the last call

Returns:

The number of presses since the last call

Return type:

int

on_pressed(callback: Callable[Button | None]) None

Register a callaback bind to press event

Parameters:

callback (Callable[Optional[Button]]) – The function to call when the event occurs. When called the button will be passed as paramater