I'm working on a project controlling the temperature of an object while taking some data from temperature sensors. This is for some less technically experienced people so I though I'd try to make a GUI so there are buttons to send commands and stuff like that instead of writing directly to the serial monitor.
I've been trying to make this in python with tkinter but I think I've come to the realization that I'm not very good at python and it's been extremely frustrating. I've held off on using matlab or something of that nature because I'm using quite a few libraries (oneWire, dallasTemp, and pid) that I'd have to port over and I'm not entirely sure how to do that.
Do you guys have any preferred way to generate GUIs for your arduino projects? Or is trying to bash my way through python really the way to go?
I did do some stuff with TKInter and found it very tedious.
Now I make my GUIs with HTML and CSS and use the Python Bottle web framework to create a simple webserver. Then the GUI is presented in my browser on the same laptop as the web server. For one of my little projects the GUI can also be accessed on a smart phone with no extra programming.
With Bottle you could have a very simple demo working in 10 or 15 minutes.
mnissov:
is trying to bash my way through python really the way to go?
Maybe not. I assume the less technically experience people get to read the temperatures on some sort of display device. A common approach appropriate with Arduino is to display on a character LCD shield that incorporates menu buttons, or a graphics LCD that has a touch screen. Neither of the above require Matlab, or anything other than the normal Arduino IDE.
Nick_Pyner:
A common approach appropriate with Arduino is to display on a character LCD shield that incorporates menu buttons, or a graphics LCD that has a touch screen.
As the OP was talking about Python I assume he wants his GUI to be displayed on a PC screen.
Yeah sorry for any lack of clarity, an LCD screen won't be very practical ideally this should be controlled from a laptop. Is bottle that simply even for people with very limited python experience? I'll definitely look into it.
mnissov:
Is bottle that simply even for people with very limited python experience?
You are probably a better judge of that than I am.
But I don't think there is any substitute for getting better at using Python. You will have at least the same amount of trouble learning any other computer programming language. Unless, of course there is another language that you already know and have not told us.
Using Python and Bottle it will also be necessary to learn HTML and probably some CSS and some Javascript. I'm not sure how to balance that amount of learning against persevering with TKInter. I was already reasonably familiar with HTML and CSS (but by no means an expert) when I started using Bottle. IMHO learning HTML and CSS is well worthwhile because CSS gives you so much flexibility with the visual appearance without having to re-write any of the Python code or the HTML.
What about using node-red?
The dashboard has several types of control you can use for setting values to send to your Arduino and also controls for displaying data coming in.
horace:
an alternative is is to build GUIs on a PC using Java, C#, VB, etc communicating with an Arduino via serial communications, ethernet, WiFi, etc
I think that general approach is implicit in the OP's original post - except that he is using Python.
Visual Studio C# seems like a reasonable choice, if you already use the Arduino IDE then the C learning curve can be shared between the two programming environments. One of the first VS apps I wrote used a PC as a "HMI" with buttons, dials and switches representing analog and digital IO. paired with a microcontroller, it was used as a teaching aid and could easily be configured for different scenarios.
Whoops forgot to check back on this over the weekend :p. I ended up just kind of trying to plod my way through with python and actually have come forward to a prettu crude but working model. I think I'll take a look at bot node-red and C#, as I have some experience with C and cpp, they both sound interesting.