Making time for my next small Arduino project, I need to do something with the rotary encoder direction information decoded by this software. A state machine is what I need, but how to implement it?
For remote control projects, a text-based serial protocol is often used. In the code for the receiver, switching to the corresponding commands can be done with switch...case in an elegant way. However ...