Difference between revisions of "WiringNP in QT"
Jump to navigation
Jump to search
(Created page with "== 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 cl...") |
|||
Line 29: | Line 29: | ||
wiringPiSetup(); | wiringPiSetup(); | ||
+ | |||
+ | before doing any other operation. | ||
+ | |||
+ | If you want to use it for PWM output, in QT it's really unstable, at least for frequencies above 50Hz. |
Revision as of 19:24, 20 April 2020
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();
before doing any other operation.
If you want to use it for PWM output, in QT it's really unstable, at least for frequencies above 50Hz.