Microcontroller Dashboard

Post Reply
GastonLagaffe
Posts: 101
Joined: Sun Oct 26, 2014 2:50 pm

Microcontroller Dashboard

Post by GastonLagaffe » Mon Jul 25, 2016 6:25 pm

Salut,

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
  • Buttons
  • Check Boxes
  • Sliders
  • Radio Boxes
  • Text and Data Labels
If you are fearless and have the time to look at the dashboard, the python script and some demo sketches are attached. If you want to have a good laugh, check the python code as this is my first program in python. If you find errors and improvements, please let me know. If you find this total nonsense, please ignore it.
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,
2016-07-25_191208.png
2016-07-25_191208.png (119.07 KiB) Viewed 426 times
the serial IO monitor
2016-07-25_191234.png
2016-07-25_191234.png (12.54 KiB) Viewed 426 times
and the resulting dashboard


Ciao, Mathias
Attachments
DashBoard_0.0.1.zip
(465.96 KiB) Downloaded 32 times

GastonLagaffe
Posts: 101
Joined: Sun Oct 26, 2014 2:50 pm

Re: Microcontroller Dashboard

Post by GastonLagaffe » Tue Jul 26, 2016 8:37 am

2016-07-25_191257.png
2016-07-25_191257.png (7.13 KiB) Viewed 426 times
for some reason, this last screenshot could not be loaded into the original message. It shows the Dashbord resulting from the commands from the board.
Pressing the buttons changes the blink frequency of the on-board LED

Ciao, Mathias

Post Reply