However I already made my first widget, which does exactly what I want and is useful. The device really made this easy. Thanks.
I have the following problem, however:
I would like to preserve a state (boolean variable) in the widget, so that when I long press BTN3,
the variable is not reset.
I tried many things, including adding the variable to the global namespace from the widget. however each time I long press BTN3 all variables are lost.
Is this expected ?
Q: Is there any other way to preserve a widget's state between long presses of BTN3,
apart from writing to storage ?
I am planning to switch this state many times, and would like to avoid writing to flash.
© Espruino, powered by microcosm.
Report a problem