ESP32 – CLI/Simple HMI

While I am working on more permanent HMI solutions I need a CLI that communicate through USB that can initialize the ESP32 based designs. A CLI is a command line interface that act like a brute force interpreter. In theory we could implement a full Unix alike shell, but I only want a few commands that is a must. But, I also recognize that this is a good way of testing board features before the HMI is finished – so here it is;

  •  *    set wifi <ssid> <password>
  •  *        // will set the ssid and password
  •  *        // automatically used at next startup
  •  *
  •  *    reboot
  •  *        // reboot the device
  •  *
  •  *    help
  •  *        // list available commands and syntax
  •  *
  •  *    stats on|off
  •  *        // switch statistics on/off.
  •  *
  •  *    hbridge <ch> <dir> <pwm-duty>
  •  *        // set hbridge to move
  •  *
  •  *    pwm <ch> <duty>
  •  *        // set pwm to duty
  •  *
  •  *    servo <ch> <pos>
  •  *        // set servo pos

For now I will use the Serial port through Arduino IDE. We can add more commands as needed. Later I will need to add this through Wifi/Telnet so I can test Model trains as well.

Leave a Reply