Package Exports
- lot-gpio
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lot-gpio) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-lot-gpio
Installation
Ref: https://github.com/loliot/lot
sudo add-apt-repository -y ppa:loliot/ppa \
&& sudo apt install lotsudo lot install cppcurl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
&& sudo apt-get install -y nodejsmkdir project \
&& cd project \
&& npm init -ynpm install lot-gpioBlink 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);