WiringNP in QT

From wiki.ferrari.mo.it
Revision as of 19:23, 20 April 2020 by Admin (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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();