PDA

View Full Version : Qt and serial programming questions



supawes
05-22-2009, 08:01 AM
Hi guys. I'm new to the robotics scene, and am wanting to make a gui (using qt designer) to send a signal to the serial port, and then go from there. where do i start? i have downloaded the mingw stuff, but none seems to be working. tried following http://www.androdna.com/programming/QtTutorial/tutorial_1.html, but when i try to "make", i have problems with SerialPort.cpp. don't know if my compiler is wrong? this is probably a typical newbie question!
i'm trying to do this through vista tho...ANY suggestions?
shot!

jes1510
05-22-2009, 11:08 AM
I don't know anything at all about QT but it's incredibly easy under python. Take a look at python and pyserial. Pyserial is a python wrapper for the serial port that makes serial coms brain dead simple.

Adrenalynn
05-22-2009, 11:45 AM
[split to its own thread http://forums.trossenrobotics.com/showthread.php?p=30600 -A]

I'd honestly suggest you start with visual basic or C#. Free from Microsoft.

Otherwise, you're going to have to learn enough about linux to translate those tutorials over to your windows environment. You've got a long road of environment setup getting those tools working under vista.

They come with test programs for you to compile and run. Before trying your own code, you should compile and run those. What were the results?

supawes
05-25-2009, 03:15 AM
Thanks! I will check those out and report back.

roycepipkins
08-21-2009, 12:16 PM
I realize this thread is pretty much dead, but I wanted to note, for future searchers, that with the recent release of Qt Creator, the windows environment setup has become pretty seamless. It has an nice IDE rolled up with a drag-n-drop GUI designer and the Qt library itself is pretty nice.

Its probably still not the correct choice for the programming novice, however. If you know C++ already and have ever used a GUI library of any sort, you'll most likely enjoy Qt very much.

Eric
08-21-2009, 12:52 PM
QT 4.5 just came out not too long ago and I agree it rocks for simplicity in C++ gui. I just started learning it 2 weeks ago. You can even use QT with OpenCV (with some modifications) Is there anything out there matches QT for gui programming (in C++)?

supawes
09-18-2009, 12:47 AM
Just a reply to Adrenalynn's advice...I have been trying VB2008 and it seems easy to use, and have developed a gui for controlling two robots (with a window switch opening different serialport objects with different BAUD rates). Shot for the advice! It seems you can also use the my.computer.ports. etc method. I never got the serial stuff going in QT tho, since I have been exposed to VB before and it was easier to pick up.