> For the complete documentation index, see [llms.txt](https://bananapi.gitbook.io/bpi-m3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bananapi.gitbook.io/bpi-m3/zh/bpi-m3_wiringpi.md).

# BPI-M3 WiringPi

**install BPI-M3 WiringPi:**

1，Download WiringPi from github For BPI-M3

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

2，Installation：

`cd BPI-WiringPi`

`chmod +x ./build`

`sudo ./build`

3，test wiringPi is install success

`gpio -v`

![](/files/-M2HXGv5NeYe3Dykk05t)

`gpio readall`

![](/files/-M2HXGv7UP-YLojARUPB)

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/>

**link to forum:**

<http://forum.banana-pi.org/t/bpi-wiringpi-officially-supports-bpi-m3-kernel-3-4/998/4>

**youtube vodeo for how to:**

<https://www.youtube.com/watch?v=OJeFWyiTqgQ>
