JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q37625F
  • License MIT

GPIO development library

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

license node language

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
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);