lot-gpio
v0.7.1
Published
GPIO development library
Downloads
93
Readme
node-lot-gpio
Installation
Ref: https://github.com/loliot/lot
sudo add-apt-repository -y ppa:loliot/ppa \
&& sudo apt install lot
sudo lot install cpp
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
&& sudo apt-get install -y nodejs
mkdir project \
&& cd project \
&& npm init -y
npm install lot-gpio
Blink example
const lot = require("lot-gpio");
let pin = 13;
if (process.argv.length > 2) {
pin = Number(process.argv[2]);
}
const led = new lot.Gpio(pin);
led.mode(lot.DOUT);
setInterval(() => {
led.toggle();
}, 200);