Qt Creator is a great IDE for C/C++ development and even if it has all the powerful features we expect in a IDE it is light and performance well.
When I need to write small snippets of code I usually use a text editor like Sublime Text, Kate or any other that has at least syntax highlighting cause they are much lighter than IDEs but as soon as the project has more than few files or I need to use libraries there are some features that I really like and aren’t easily find in text editors, per example code completion or navigation through functions definitions. So I use Qt Creator for that cases. We need to select New File or Project and then Import Existing Project.
Give a name to the project and select the path where it is located. Select the files that belong to the project.
Qt Creator will add some files to the project: project_name.config, project_name.creator, project_name.files and project_name.includes.
project_name.includes is one of the most important files because is here where we should add the paths to libraries. In this case I added the paths to STM32 standard peripheral library from ST and also CMSIS library from ARM.
Now you can use Qt Creator to develop or debug your STM32 projects per example.
The project I talked in the first post is about controlling a quadcopter using a mobile phone. When I thought to build a quadcopter my first approach was to build all from scratch, software, control and electronics. During my research I found OpenPilot that is all what I was looking for and with a great community so I opted to use it and as soon as possible start to contribute to it.
Because I already had some knowledge in Qt I applied to Nokia N9 Devkit with the goal of controlling the CopterControl using the mobile phone, the project have been accepted.
I’m using RN174 (WiFi-Serial link) to connect the mobile to OpenPilot CopterControl (OPCC). You can see more information here. The serial baudrate is 115200 between RN174 and OPCC. I’m sending the packets using UDP at a 20ms rate. The RN174 have a PCB antenna and that is a weakness of course, will need to do a PCB with a SMA antenna. The following image ilustrates the connection between OPCC and RN.
I use the MainPort of OPCC to talk with the RN174 so it need to be used as Telemetry.
The UAVTalk object used in the project is the GCSReceiver that simulate a controller. Every 20ms the mobile phone update the values for throttle, roll, pitch, yaw and flight-mode in OPCC. To use the GCSReceiver object we need to set the RC Input type to GCS as you can see in the next image.
The application running on the mobile phone was developed in Qt. The layout of the joysticks are the same as GCS Control, the square area is equal to a real controller instead of the circle that I did before.