# BPI-M1 WiringPi

BPI WiringPi support all raspberry pi module and all banana pi module :BPI-M1,BPI-M1+,BPI-R1,BPI-M2,BPI-M2+,BPI-M2 Ultra,BPI-M2 Magic,BPI-M3,BPI-M64

[ https://github.com/BPI-SINOVOIP/WiringPi ](https://github.com/BPI-SINOVOIP/WiringPi)

[https://github.com/BPI-SINOVOIP/WiringPi/tree/master/wiringPi/board](https://github.com/BPI-SINOVOIP/WiringPi/tree/master/wiringPi/board)

**install BPI-M1 WiringPi:**

1，Download WiringPi from github For BPI-M1

`git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M1`

2，Installation：

`cd BPI-WiringPi`

`chmod +x ./build`

`sudo ./build`

3，test wiringPi is install success

`gpio -v`

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX7rA4t8xn8OqbrQU%2FBPI-M2%20wiringpi%201.png?generation=1584080163574256\&alt=media)

`gpio readall`

![](https://1043524483-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2HWtR4yn0n86hux-lY%2F-M2HWuD9ps7L0GChhV74%2F-M2HX7rCatGIVF3DTZ6G%2FBPI-M2%20wiringpi%202.jpg?generation=1584080164300323\&alt=media)

4，create new : blink.c

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

compile and run it:

`gcc -Wall -o blink blink.c -lwiringPi`

runing it:

`sudo ./blink`

BPI have many extend board support WiringPi. so you can free DIY by youself:

more about BPI extend board,please see:

[https://bananapi.gitbooks.io/bpi-accessories/content/](https://bananapi.gitbooks.io/bpi-accessories/content/)
