ciclonite
Posts: 31
Joined: Tue Jun 30, 2015 9:16 pm

Buildroot + QT C/C++ programming

Fri Oct 23, 2015 9:42 am

Hi all,
this is my first post on english forum. Sorry for my bad english but my primary language is Italian.
I need a help for start a project with raspberry PI + buildroot and QT.
I've installed on my Raspberry PI model B the https://github.com/pbouda/buildroot-qt-dev Buildroot Qt, and configure the QT OpenSource for the cross compiling. Everything works fine.
I want to use c/c++ as primary language form my application ( read a temperature from GPIO , command a relay ..etc)..
The system must be stable.
Which is the best solution for use gpio in c/c++?
- Using Sysfs?
- Using Direct Registry Access?
- Other?
Please someone have some resource to study?
Thanks a lot.

User avatar
DougieLawson
Posts: 35589
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Buildroot + QT C/C++ programming

Fri Oct 23, 2015 12:13 pm

You may be more comfortable writing on viewforum.php?f=79 in Italian.

The easy to use library for GPIO is Gordon's WiringPi, which is pre-installed on Jessie.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ciclonite
Posts: 31
Joined: Tue Jun 30, 2015 9:16 pm

Re: Buildroot + QT C/C++ programming

Fri Oct 23, 2015 12:36 pm

DougieLawson wrote:You may be more comfortable writing on viewforum.php?f=79 in Italian.

The easy to use library for GPIO is Gordon's WiringPi, which is pre-installed on Jessie.
Thanks a lot DougeLawson, but in the Italian forum there insn't skilled people like here.. :)
I'have take a look at WiringPi but it's too much at higher level of abstraction..
Have you never used the pigpio library?
Thanks a lot!
Giovanni

User avatar
DougieLawson
Posts: 35589
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Buildroot + QT C/C++ programming

Fri Oct 23, 2015 1:49 pm

I like Joan's pigpio library, it's nice and simple, but it's not pre-installed in Raspbian.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ciclonite
Posts: 31
Joined: Tue Jun 30, 2015 9:16 pm

Re: Buildroot + QT C/C++ programming

Fri Oct 23, 2015 1:52 pm

It's Perfect! Now i'm facing another problem.. buildroot, i'm unable to add and compile the package pigpio .. i need to study buildroot .. :) I hope google it's my friend..
Thanks again for the quick reply.
Giovanni

User avatar
yasriady
Posts: 27
Joined: Wed Apr 08, 2015 2:37 am
Location: Indonesia
Contact: Website

Re: Buildroot + QT C/C++ programming

Sun Oct 25, 2015 12:42 am

I made my cross compilation toolchain with buildroot. It's perfect and provide automation to build both your target and host dependency libraries for ie: x11, gtk, sqlite3, databases, and many packages to choose from.

I hope this blog with give some idea to begin with: http://yasriady.blogspot.co.id/2015/10/ ... ry-pi.html
MyRaspberryPi : Cross Compile, wxWidgets/C++ and Linux Journal at http://yasriady.blogspot.com

Return to “C/C++”