Is it possible to have an Arduino listen to a serial input in parallell with it doing things with its local outputs?
I want to make a controller for LEDs that would do some simple animations (using non-blocking code) that can shift between modes when a command for that ("device 345, use pattern 12") comes on the serial input. The commands may come at any time and should be followed in less than a second.
Basically -
In your loop(), test serial.available often, read each bundle, then append any characters to your ‘input buffer’
When the message terminator (CR?) is received, process and clear your input buffer