Control Onion Omega2 GPIO pins from NodeJS using fast-gpio.
npm install --save gpio-omega2
'use strict';
const GpioOmega2 = require('gpio-omega2');
const gpio = new GpioOmega2();
const pinNumber = 0;
const pin = gpio.pin({pin: pinNumber, mode: 'output'});
pin.high();
'use strict';
const GpioOmega2 = require('gpio-omega2');
const gpio = new GpioOmega2();
const pinNumber = 0;
const led = gpio.led(pinNumber);
led.on();
'use strict';
const GpioOmega2 = require('gpio-omega2');
const gpio = new GpioOmega2();
const pinNumber = 0;
const led = gpio.led(pinNumber);
const delay = 500;
led.blink(delay);
- pin.high();
- pin.low();
- pin.toggle();
- pin.set(value);
- led.on();
- led.off();
- led.toggle();
- led.blink();
- led.stopBlinking();
- Felipe Céspedes - [email protected] - felipecespedes
This project is licensed under the MIT License - see the LICENSE file for details