Super simple commandline processor for Arduino environments. Features:
- super small and simple codebase, easy to modify
- provide minimal input editing (backspace)
- register commands, let commands parse args
- register command word callbacks using
addCommand()
- in the callback, use
getArg()
orgetRest()
to get next arg or rest of commandline for parsing - register default callback using
setDefault()
to print help/error message - for interactive input processing, use
CommandParser(HardwareSerial *serial)
constructor and callloop()
in sketch's ownloop()
- for batch processing (for example, command recieved via MQTT or HTTP) use
CommandParser()
constructor andparseLine()
The best simple example can be found in https://github.com/tve/esp32-secure-base/blob/master/src/ESPSecureBase.cpp