Copyright 2014 David Deane aka TechGuyDavid.com
TechGuyDavid.com
TechGuyDavid.com
This Site Spun with SiteSpinner
TGDpage5.html
Arduino UNO External Control GUI
Site Map - TechGuyDavid.com
Index - Home
TGDpage2 - more software
TGDpage3 - RoboWorks
TM
TGDpage4 - 3D Steam Loco
TGDpage5 - Arduino Uno Ctrl
The popularity of the Arduino series has spurred me to design an external control GUI for the Arduinoi UNO to use with my DCC Trains.
Click on the image above for a full size image.
I currently control my DCC trains using a couple of  USBIO modules with 24 IO pins each. It takes two modules to control the trains in automatic control.

Having PWM and analog inputs using the Arduino UNO or MEGA 2560 would greatly expand the possibilities. With this in mind, I decided to create a general purpose GUI for the UNO that has all of the funtions that I will be using in my control scenarios.

The Arduino DUO requires two files. One is the ino sketch that is uploaded to the Arduino UNO. In this case, this sketch tells the UNO how to respond to commands sent to through the USB Serial Port. The second file is a Liberty Basic GUI control file that interfaces between the PC and the UNO board.

Download both files in one 11kB ZIP file, free for personal or educational use only. Not suitable for commercial use. The simple text for each is also included in the ZIP file for copy and paste or review.

Download the Liberty Basic Booster exe file as a ZIP file if you don't have Liberty Basic on your computer.


First and foremost, Liberty Basic is a "can't live without program." Before I retired, I wrote GUIs in Visual Basic and Liberty Basic, among other languages, depending on the Operating System. In my humble opinion, Liberty basic is much easier to use and easier to understand, besides being quite inexpensive. I simply do not use Visual Basic unless the client specifically requests it. Then it just takes longer to finish the project. I'm sure that there are valid reason to use Visual Basic, but I can't think of any off hand.

This (personal) project required graphical controls of digital and analog IO pins on the Arduino UNO. I also wanted graphical display of analog signals using both bar graphs and line graphs. While I was at it, I wanted control of the graphs speed and resolution. Note that these graphs run from right to left to obtain a continuos display of the last 500 points of data for A3 and A4.

It would be easy enough to output a text data value to the PWM pins, but I prefer color coded vertical sliders. Digital Set commands are checkboxes and Digital Reads are statictext 1 or 0. The Com Port is identified from the Device Manager and entered manually into the Com Port text box. If I was only going to use one board, I would search for the board ID automatically, but that didn't seem practical for this project. For simplicity, I put everything in percent, instead of using 10 bit accuracy. My trains only need 0 - 100 % to operate.



Back
Index - Home
TGDpage2 - more software
TGDpage3 - RoboWorks
TM
TGDpage4 - 3D Steam Loco
TGDpage5 - Arduino Uno Ctrl
TGDpage6 - GC Helper loco
TGDpage7 - DCC Zones
Next
TGDpage8 - DCC General Layout