banana pi BPI-M2 A31s quad core single board compu
  • Initial page
  • LANGS
  • Banana pi BPI-M2
    • BPI-M2 hardware interface:
    • Summary
    • Armbian linux for BPI-M2
    • BPI-M2 source code on github
    • BPI-M2 WiringPi
    • BPI-M2 3.7V lithium battery interface
    • How to setup docker env. to build github source code
    • A31 Manual build howto
    • BPI-M2 GigE LAN
    • All Banana Pi SBC Comparison
    • OpenSuse for BPI-M2
    • BPI-M2 software
    • BPI-M2 Camera interface
    • BPI-M2 Building a Minimal linux System
    • BPI-M2 schematic diagram
    • Bananian linux
    • BPI-M2 IR interface
    • NetBSD/evbarm on Allwinner Technology SoCs
    • Android software
    • BPI-M2 wifi antenna slot
    • BPI-M2 RGB DSI interface
    • BPI-M2 quick start
    • BPI-M2 CE FCC RoHS Certification
    • BPI-M2 linux-sunxi wiki
    • BPI-M2 DXF and 3D design
    • linuxkernel33
    • BPI-M2 OTG interface
    • mainline kernel
    • OpenWRT
    • BPI-M2 GPIO Pin define
    • Reference documents for BPI-M2
    • Allwinner chip documents
    • How to building a Minimal system for BPI-M2
    • BPI-M2 USB interface
    • BPI-M2 WIFI interface
    • BPI-M2 DC Power interface
    • BPI-M2 micro SD card slot
    • How to build Android 4.4.2 Image for BPI-M2
    • ABD driver
    • Linux mainlining effort
    • BPI-M2 HDMI interface
    • BPI-M2 hardware spec:
    • uboot
  • Banana pi BPI-M2
    • ABD driver
    • All Banana Pi SBC Comparison
    • BPI-M2 hardware spec:
    • Summary
    • BPI-M2 schematic and gerber file
    • A31 Manual build howto
    • bpi-m2-hardware
    • BPI-M2 CE FCC RoHS Certification
    • All banana pi product
    • BPI-M2 DXF and 3D design
    • Bananian linux
    • BPI-M2 GPIO Pin define
    • Allwinner chip documents
    • Android software
    • Armbian linux for BPI-M2
    • BPI-M2 3.7V lithium battery interface
Powered by GitBook
On this page

Was this helpful?

  1. Banana pi BPI-M2

BPI-M2 WiringPi

PreviousBPI-M2 source code on githubNextBPI-M2 3.7V lithium battery interface

Last updated 5 years ago

Was this helpful?

install BPI-M2 WiringPi:

1,Download WiringPi from github For BPI-M2

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

2,Installation:

cd BPI-WiringPi

chmod +x ./build

sudo ./build

3,test wiringPi is install success

gpio -v

gpio readall

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/