Which desktop programming language?

Hi,

I need to develop a relatively small windows desktop app to communicate and conrrol my arduino peoject over serial and maybe tcp/ip.

Never programmed a winsows app before and have no experience with object oriented languages.

Which programming language would you recommend to learn/use for the above?

(Obviously i am already familiar with arduino C.)

Python. Pick something you want to do (e.g. serial communications). There will often be two or more well written well debugged libraries that do that.

Being an interpreted language allows you to fiddle with a bit of code until it does what you want. I believe this dramatically flattens the learning curve.

However, to be effective, you need to move the fiddling code to something reasonably well packaged; ideally packaged as classes. Skipping the clean up pass, in my experience, ends in a nightmare.

For the interactive part of your application I would go with Django; make it a web application. (And use the Django debugging server. Nginx / Apache are appropriate if it's exposed to the internet-at-large but not in-the-small.)

Being an interpreted language ...

So i wont be able to produce a stand alone app ?

For the interactive part. ...

Python doesn't support windows GUI development and i need another language for that?

Personally, I like MS visual studio; yes, arguments can be made. However, it is simple to learn - whether it be VB or C++; thus, one can hit the ground running. In addition, numerous solutions are available via stackoverflow.com and the like.

Serial Port Example - just a quick google search.

I use Processing to communicate between my Arduino projects and PC.

bookmarked - thanks gF

I use Processing to communicate between my Arduino projects and PC.

Are you able to create forms and other GUI windows objects with it?

Processing is a language with strong GUI features that has elements in common with the Arduino system. Processing is based on Java.

Or just use the main-stream Windows GUI systems such as Visual Basic or Visual C#

You can create a Windows GUI with Python and TKinter. It's a long time since I wrote it but I think this Python GUI demo can work on Windows.

...R

If you don't need a proper GUI, you can use the inbuilt Windows Powershell to talk to an Arduino, say over a serial connection.

If you don't need a proper GUI, you can use the inbuilt Windows Powershell to talk to an Arduino, say over a serial connection.

Thanks but i can already do that over any serial terminal. I was looking for a proper windows app with forms, buttons etc to upload settings to arduino, display data from arduino graphically etc

Processing is a language with strong GUI features that has elements in common with the Arduino system. Processing is based on Java.

Is it easy for someone with C knowledge to learn processing?

If you have written much for Arduino you have a leg up learning Processing. The languages (?) are pretty similar. There are libraries to help wih making GUIs, networking and a lot more. Many examples, too

Watcher:
So i wont be able to produce a stand alone app ?

https://www.google.com/search?q=python+standalone+executable

:wink:

Watcher:
Python doesn't support windows GUI development and i need another language for that?

There are Python bindings for various GUI libraries. Inkscape gives a good idea of what is possible.

However, the advantages of a web application far outweigh those of a Windows specific GUI application. And, the cost is essentially insignificant ($5 Raspberry Pi).

I was able to write a short Windows GUI program that manipulated the Serial port, using Visual Basic, in spite of never having used Visual Basic before, never written GUI code before, and having been ages since I wrote any BASIC code... I was moderately impressed.

(You can see it here: https://www.instructables.com/id/Serial-Controlled-Variable-Speed-Motor/

Wish I could just use Arduino C to code a widnows up without having to go through the learning curve of another language.

Having said that, I have tired in the past to use the MS Visual studio (C++) but... never got past the IDE familiarization stage :confused:

See Processing 3 yourself, https://processing.org/

It does a lot of things for you. You can be experimenting with shapes without having to make a window first for example.
It can make executable files.

It does a lot of things for you. You can be experimenting with shapes without having to make a window first for example.

Yes it does look like an attractive option...

Downloaded, installed and played with processing today...

Found out that compiling to a stand alone executable is not a straight forward procedure. The IDE just provides an export function that produces java runtime files.

The language seems more focused on video and graphics manipulation.
Couldn't -yet- find any user input windows like form submission (with radio buttons, drop down lists, scroll bars etc)

Not sure if this is whats best for my application...

I'm a huge fan of web applications. HTML + JavaScript is great for creating all kinds of inputs (forms, buttons, sliders, drop-down menus, you name it), and with a bit of CSS, it looks very professional.
Bonus: it works on any platform, even on your smartphone or tablet.

If you have a relatively powerful Arduino with a network connection (ESP8266/32, for example), you can use it as a file server, so you don't need a "real" server.

If you can't use the Arduino to serve your files (if it only has a serial connection, no WiFi or Ethernet, if it doesn't have enough memory, if it's too slow ...), you can use a small backend application that serves the HTML pages and communicates with the Arduino over Serial, and with the web interface using WebSockets.
Node.js is great for this task, because it supports WebSockets natively, has easy serial port access, asynchronous programming is great for file serving and socket communication, and you only have to learn a single language, you can use JavaScript for both your frontend and backend.

Pieter

PieterP:
I'm a huge fan of web applications. HTML + JavaScript is great for creating all kinds of inputs (forms, buttons, sliders, drop-down menus, you name it), and with a bit of CSS, it looks very professional.

So am I. But there is a great deal to learn if you are starting with no knowledge of any of it. I had been thinking of posting an example but realized that it would just be too complicated to explain in terms that a complete newbie could follow (or I was too lazy to write a complete treatise on web programming :slight_smile: )

Watcher:
Downloaded, installed and played with processing today...

Found out that compiling to a stand alone executable is not a straight forward procedure. The IDE just provides an export function that produces java runtime files.

I don't like the Java programming language but I am a great fan of the Java Run Time system as it means that a Java program will run on any PC operating system that can host the JVM.

My guess is that learning the extra step to make your exported Processing program work "standalone" (meaning, with the JVM) would be easier than learning web programming. It probably just needs a .bat or .sh file with a short command.

However if you are prepared to take the trouble to learn web programming then IMHO you will have a much more versatile skill. I make all my GUIs with HTML CSS and javascript and generally use the Python Bottle web framework to host them.

...R