orange-pi-gpio
This module allows you to easily manage GPIO pins on your Orange PI PC using Node.js
Before Install
You need to make sure that WiringOP is installed on your Orange PI PC. If not, then you need to install it. To do this, run the following commands:
git clone https://github.com/zhaolei/WiringOP.git -b h3 cd WiringOPchmod +x ./buildsudo ./build
Install Module##
npm i orange-pi-gpio
Usage
Blink app
const Gpio = ; let gpio5 = pin:5 mode: 'out' { let value = 1; ; };
Methods
read
const Gpio = ; let gpio5 = pin:5; gpio5 ;
write
const Gpio = ; let gpio5 = pin:5; gpio5; // write 1 to pin 5gpio5; // write 0 to pin 5