while (true) {
switch (state) {
case a: do_a()
state = b
case b: do_b()
state = c
case c: do_c()
state = a
}
}
Obviously this doesn't work in NodeMCU as it is written, but it's fairly
straightforward to reduce the individual cases to timers and callbacks.
What I can't see is how to remove the main while() loop. Apparently running
such a loop continuously blocks out the underlying Espressif software, and
the application hangs.
How do you handle a continuous main loop on the ESP8266? (Converting the
individual cases isn't a problem.)
Thanks - Will