Orange Pi 2G-IOT User Manual
Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org
www.xunlong.tv
22
a. Download the latest WiringPi source code of Orange Pi 2G-IOT
Please confirm that the Orange Pi 2G-IOT has connect to wifi or network successfully, if
no, then you need to first make it connect to wifi or network. If you connect to network,
then you also need to install some essential tools:
sudo apt-get install git gcc make
b. Download the latest source code
You could download the latest WiringPi source code from official website:
www.orangepi.org
You could also download files from github:
https://github.com/OrangePiLibra/WiringPi.git
with the following command:
env GIT_SSL_NO_VERIFY=true git clone
c. Compile and install WiringPi
Use the following command to compile and install the WiringPi after get the latest source
code.
cd WiringOP/
./build OrangePi_2G-IOT
./build OrangePi_2G-IOT install
d. Test WiringPi with gpio command
You could use gpio command to test GPIO on 40pin on Orange Pi 2G-IOT with WiringPi
installed.
i Use "gpio readall" command to print out all WiringPi pin mapping as following.
BCM line represents the actual hardware GPIO, there are 4 Groups GPIO and each
Group have 32pins, and the serial number start from Group PA. PA0 corresponds to BCM
colum number 0.
wPi line represents pins of wiringPi, you could use this group of data when use C library
and gpio command on wiringPi. For example, number 37 pin is corresponding to number
25 pin of wiringPi, you could operate the 37 via operating 25pin.
Name line represents the definition name of Pin.
Mode line represents the mode of pin, it could but both input and output.
V line represents the voltage value of the current pin.
Physical line represents the actual hardware number.