Skip to main content

Rthon

This script runs on the FreeWili itself: there is no connect() step and no transport to open, because the global dev object already exists when your script starts - it's the same API surface as the Python OneWili device, minus connection management.

Send a first command:

v = dev.gui.set_led_color(1, 1, 1, 1, 1, 1)
if dev.ok:
print("value: " + v)
else:
print(dev.last_error)

To run it: save the script as a .py file on the device's filesystem, then run it from the device's main menu run-script entry.

rthon is a Python subset, not full Python, so a few things differ from the desktop package: there are no exceptions and no match statements; every call sets dev.ok, dev.last_error, and dev.last_response instead of returning a Result - check dev.ok after each call rather than catching an error; and Bytes and multi-value returns arrive as plain strings.

Full command list: GUI Functions - or start at the API index.