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_touch

Thingz button touch

class thingz.thingz_button_touch.ButtonTouch

Control Galaxia’s touch buttons

is_touched() bool
Returns:

True if button is touched, False otherwise

Return type:

bool

was_touched() bool
Returns:

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

Return type:

bool

get_touches() int

Get the number of touches since the last call

Returns:

The number of touches since the last call

Return type:

int

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

Register a callaback bind to touch event

Parameters:

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