led-hands-rpi/main.js

18 lines
443 B
JavaScript
Raw Permalink Normal View History

2019-03-09 14:30:52 -06:00
let gpio = require('rpi-gpio')
const BLUE = 37
const WHITE = 35
const RED = 33
const GREEN = 31
const YELLOW = 29
const LEDS = [BLUE, WHITE, RED, GREEN, YELLOW]
// gpio.setMode();
gpio.setup(WHITE, gpio.DIR_OUT, gpio.write);
// gpio.setup(BLUE, gpio.DIR_OUT, gpio.write);
// gpio.setup(RED, gpio.DIR_OUT, gpio.write);
// gpio.setup(GREEN, gpio.DIR_OUT, gpio.write);
// gpio.setup(YELLOW, gpio.DIR_OUT, gpio.write);
gpio.write(WHITE, true);