some time ago I thought it would be a good idea to have a simple method on my PC to serve simple, reoccurring tasks such as LEDs, Buttons, Sliders etc. It saves me time as I do not have to hook up a breadboard with buttons and LED or poti with all the logic and pull-ups etc. if I want to test something.
The Dashboard reads the serial output of my board and the commands are interpreted to display buttons, sliders, text and labels. If an action is done on the PC side, the Dashboard sends a message to the board for processing (like the button ID that was pressed). With this setup, I can create three button by simply sending three commands at the start of my code and wait for the Dashboard to handle the input, de-bouncing, etc.
It is also rather simple to send measurement data to a label and see the output on the screen. Even simpler than Serial.println statements.
At that time I wrote a VisualBasic program but as some of my friends use Linux, I always wanted to write this Dashboard in something platform independent.
Finally I had a reason to write code in Python, so I created the Dashboard using python3 (and python2-Tk, python3-serial) that provides
- LED in RGB
- Check Boxes
- Radio Boxes
- Text and Data Labels
The original program had timelines, polar-plots and histograms. That's on my to-do list using matplotlib.
I also attached three screenshots from the connect screen, the serial IO monitor and the resulting dashboard