8,367
edits
Changes
→Usage of GPIO and WiringPi
=== '''Usage of GPIO and WiringPi''' ===
<br>
'''1)Use WiringPi on OrangePi 2G-IOT IoT to connect network'''<br>
<br>
<div style="padding-left:100px;">[[File:Orange-pi-2g-iot-img17.png|600px]]</div>
<br>
OrangePi 2G-IOT IoT could support WiringPi, you could have a try according to the introduction on this section. The following is 40 Pin of OrangePi. <br>
<br>
a.Download the latest WiringPi source code of Orange Pi 2G-IOTIoT<br>Please confirm that the Orange Pi 2G-IOT 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:<br>
<div style="padding-left:40px;"><span style="background:#fffaa5;">sudo apt-get install git gcc make</span></div>
b.Download the latest source code <br>
Use the following command to compile and install the WiringPi after get the latest source code. <br>
cd WiringOP/<br>
./build OrangePi_2G-IOT IoT <br>./build OrangePi_2G-IOT IoT install<br>
d.Test WiringPi with gpio command<br>
You could use gpio command to test GPIO on 40pin on Orange Pi 2G-IOT IoT with WiringPi installed.<br>
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.<br>
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.<br>