Watched you clip...
I think the measuring cycle and the display cycles and processes should. be independent / asynchronous and 'virtually' simultaneously, both triggered by their own intervals or interval and timeout, and any rendering to the display should happen only if data has changed, with once a while a display of data that has not been displayed for a while. With that in place you get the best out of both model/data and view worlds.
For simulation, you can take a second board with which you produce the events and values for the first one.
You can also use the Testing and Monitoring feature built into Espruino Web IDE to not only drive your board but also monitor it, display behavior in a graph with lines and even record the monitor results. In settings enable the Testing feature and setup some testing configurations.
© Espruino, powered by microcosm.
Report a problem