Skip to content

This is a GPIO access library for NanoPi Neo. It is based on WiringNP which is based on the WiringOP for Orange PI which is based on original WiringPi for Raspberry Pi.

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
LICENSE
Notifications You must be signed in to change notification settings

PlantWire/WiringNP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiringNP

This is a GPIO access library for NanoPi_Neo. It is based on WiringNP which is based on the WiringOP for Orange PI which is based on original WiringPi for Raspberry Pi.

The WiringPi version was adjusted so that only static library building is supported. Also the only supported board by this fork is the "NanoPi Neo". This fork supports the newer "Buster"-images based on Armbian which the original does not support.

Installation

Install WiringNP

Log into your nano board via SSH, open a terminal and install the WiringNP library by running the following commands:

git clone https://github.com/friendlyarm/WiringNP
cd WiringNP/wiringPi
make static
sudo make install-static

Code Sample with WiringNP

connect a LED module to a NanoPi (Pin7), Make a C source file:

vi test.c

Type the following lines:

#include <wiringPi.h>
int main(void)
{
  wiringPiSetup() ;
  pinMode (7, OUTPUT) ;
  for(;;)
  {
    digitalWrite(7, HIGH) ;
    delay (500) ;
    digitalWrite(7,  LOW) ;
    delay (500) ;
  }
}

Compile and run "test.c":

gcc -Wall -o test test.c -lwiringPi -lpthread
sudo ./test

You can see the LED is blinking.

About

This is a GPIO access library for NanoPi Neo. It is based on WiringNP which is based on the WiringOP for Orange PI which is based on original WiringPi for Raspberry Pi.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.3%
  • Makefile 3.5%
  • CMake 0.2%