PDA

View Full Version : serial port programming and fancy telemtry control.



hjjayakrishnan
2nd July 2012, 14:02
I'm working on a quad-copter,
which i need to control via the COM port of my PC. I added qextserial
library from http://code.google.com/p/qextserialport/, but i had read
in a post in an instructable that you have to compile it in the prompt
console or something, well, i wasn't able to do it. So i'm not quite
sure if the serial thingy is working in the first place. Please do
tell me what i should do.
Also, I've attached a copy of how my telemetry control software should
look like, please do have a look and point me in the right direction
on what category it falls when i select the new project.7926

And i'm using Qt Creator 2.4.1

kuzulis
2nd July 2012, 14:16
You can try another library QtSerialPort (http://qt-project.org/wiki/QtSerialPort)

Also see this topic (http://www.qtcentre.org/threads/49716-Adding-QtSerialPort-as-a-library)

high_flyer
2nd July 2012, 16:01
well, i wasn't able to do it.
Will you tell us what was the problem or do we have to guess?

Also, I've attached a copy of how my telemetry control software should
look like, please do have a look and point me in the right direction
The right direction to where?
What do you expect as and answer?

Please be more specific with the problems you have.

hjjayakrishnan
5th July 2012, 17:01
Sorry about that.

1. I have never worked with qt before, so if you just say do qmake , do compile, etc etc I'm not gonna understand a thing. So i'd appreciate, if you could tell me, step by step, what i should do to get qextserialport working on my qt. I've just downloaded it and extracted it. I've looked at tons of material on google, and none helped me.

2. There are analog meters and graphics that you usually see in flight simulators, to check the inclination of the aircraft. I will be using data from my accelerometer and gyroscopes, send them via the serial port and into these meters. Is there some way i could download the code, for say, the analog meter and add it to my project, rather than coding the entire thing from scrap. If, yes how can i do that?

I hope i have conveyed it, this time.
Thanks in advance.

Added after 8 minutes:

Sorry about that.

1. I have never worked with qt before, so if you just say do qmake , do compile, etc etc I'm not gonna understand a thing. So i'd appreciate, if you could tell me, step by step, what i should do to get qextserialport working on my qt. I've just downloaded it and extracted it. I've looked at tons of material on google, and none helped me.

2. There are analog meters and graphics that you usually see in flight simulators, to check the inclination of the aircraft. I will be using data from my accelerometer and gyroscopes, send them via the serial port and into these meters. Is there some way i could download the code, for say, the analog meter and add it to my project, rather than coding the entire thing from scrap. If, yes how can i do that?

I hope i have conveyed it, this time.
Thanks in advance.

high_flyer
5th July 2012, 17:01
qextserilport is just a lib.
You have to built it, and link it in to your project.
If you don't know how to build a project, and how to link, the task of writing a flight simulator is nothing something you should take on as first thing.
There is an open source project specially for what you want to do - so maybe you don't need to code anything, just install and configure the ready thing (its Qt based):
http://www.openpilot.org/

hjjayakrishnan
5th July 2012, 17:11
Could you tell me, how to build it and link it? Actually i wanted to make one on my own :)

high_flyer
5th July 2012, 17:13
Could you tell me, how to build it and link it?
No, as this is off topic for this forum.
This is a Qt forum, not programming basics forum.

hjjayakrishnan
5th July 2012, 17:18
I am experienced in c++. What i don't understand is the terminology, perhaps. By linking, do you mean including the path to the header files? I happened to read quite a lot of articles where they use qmake etc on command prompt, I'm guessing that is exclusive to qt, as I've seen nothing of that sort in visual c++, with which i have worked.

kuzulis
5th July 2012, 19:04
2 hjjayakrishnan,

You do not know any sort of basis C++ and base process compilation and linking.

If you want get answer right away - no one will give it to you. Be so kind please understand though, would be in the basic things.
And Qt has got nothing to do with it - it's just a set of classes. And by the way, VS also has a command line...

As for the assembly and linking serial libraries - they have a comprehensive step by step documentation.

PS: For a brief introduction to Qt recommend reading the literature, for example:


Jasmin Blanchette, Mark Summerfield - C++ GUI Programming with Qt4 (2nd Edition)

ChrisW67
7th July 2012, 06:35
1. I have never worked with qt before, so if you just say do qmake , do compile, etc etc I'm not gonna understand a thing. So i'd appreciate, if you could tell me, step by step, what i should do to get qextserialport working on my qt. I've just downloaded it and extracted it. I've looked at tons of material on google, and none helped me.


Now, here's the thing... that is exactly how you build QextSerialPort (http://docs.qextserialport.googlecode.com/hg/1.2/index.html#using-qexserialport-as-a-system-library) in a step by step fashion for a generic system. Running qmake and make is also the most likely way you will build any Qt application of your own (either manually or by having an IDE do exactly this for you). I suggest you remedy your current inability to follow those directions by informing yourself about the normal process of building a Qt program by reading at least some of the Qt documentation: people wrote the docs for a good reason.

Here are two tips that might, or might not, be useful, based on guessing what your environment might be:

If you have installed the Qt SDK on your Windows box then there is a "Qt Command Prompt" (or similar) option on your Start menu.
If you have used the bundle MingW compiler then the "make" command is "mingw32-make"

Ultimately I do not know if QextSerialPort can be built on Windows with those tools.

If you want specific answers to specific questions you will have to tell us anything about your environment, which version of QextSerialPort, what compiler, linker, Qt version, platform etc. You will also need to demonstrate that you have actually tried and how that did not work for you. Otherwise we're just guessing with even less information than you have.