I see you're using switch(Serial.read()). I wrote standalone library to register handlers as commands. me_Menu.
When handler is executed it can read Serial on their own if it needs additional data. For example here me_RgbStripeConsole reads pixel's color from stream.
This approach allows you to have multi-character commands. Plus default implementation supplies ? command to print list of available commands.
Hello Ricardo,
I see you're using
switch(Serial.read())
. I wrote standalone library to register handlers as commands. me_Menu.When handler is executed it can read Serial on their own if it needs additional data. For example here me_RgbStripeConsole reads pixel's color from stream.
This approach allows you to have multi-character commands. Plus default implementation supplies
?
command to print list of available commands.-- Martin