WiringNP in QT
Jump to navigation
Jump to search
Installing WiringNP
The WiringNP in the /root folder, at least for NanoPI K1 Plus, is not good. It shows the NanoPI Neo/Neo2 GPIOs.
Reinstall it from sources:
git clone https://github.com/friendlyarm/WiringNP cd WiringNP/ chmod 755 build ./build
then, check it via gpio command
gpio readall
Use in QT
Add the following line to <project>.pro:
LIBS += /usr/local/lib/libwiringPi.so
It will include the libpthread.so library automatically.
In the files, don't forget to add
#include <wiringPi.h>
and
wiringPiSetup();