# simple example # from machine import Pin from pxsi import Pxsi with Pxsi('MyBox'): t = 0.5 # blink interval a = 'x' b = 0 # changes to this variable will be converted to int ! Pxsi.add(d=0.0) # called whenever a is changed remotely def change_a(value): print(f'changed t: {value!r}') return str(value) # return validated value led = Pin(6, Pin.OUT) def main(): while 1: led.toggle() Pxsi.handle(t) # wait at most for the given blink interval Pxsi.vars['b'] += 1 main()