Commands to control a traffic light
Works with a Cleware USB traffic light.
$ npm install hello-lights --save
Issue commands to control a connected traffic light:
const {Commander} = require('hello-lights');
let commander = new Commander();
// keeps flashing the red light in 400ms intervals
commander.run('twinkle red 400');
For the Commander
class documentation look here.
Check out the available commands here. For multiple traffic lights (Commander.multi
) look here.
For the documentation look here.
Licensed under the MIT license.