npm install chain-pwmchain-pwm
=========




npm install --save chain-pwm``js
var five = require('johnny-five');
var board = new five.Board();
var Pc = require('chain-pwm');
board.on('ready', function() {
this.pinMode(6, five.Pin.PWM);
// Constructs a new PWM chainer with pin 6 and the board.
var p = new Pc(6, board);
// Begin the output at 255
p.begin(255)
// Then write 100, and keep that level for 500ms
.then(100, 500)
// Then write 50 and keep that level for 1s
.then(50, 1000)
// Actually it is kept indefinitely, since we have no next step.
// Call start to start the chain.
.start();
});
``