20 lines
429 B
JavaScript
20 lines
429 B
JavaScript
// Generated by CoffeeScript 1.6.3
|
|
require('../../dist/digital-pin');
|
|
|
|
var pin4 = new Cylon.IO.DigitalPin({ pin: 4, mode: 'w' });
|
|
|
|
pin4.on('open', function(data) {
|
|
console.log("Pin files have been created");
|
|
});
|
|
|
|
pin4.on('digitalWrite', function(value) {
|
|
console.log("Value written to pin: " + value);
|
|
});
|
|
|
|
pin4.on('connect', function(data) {
|
|
console.log("Pin mode has been setup!");
|
|
pin4.setHigh();
|
|
});
|
|
|
|
pin4.connect();
|