cylon/examples/digispark_blink/blink.js

18 lines
297 B
JavaScript
Raw Normal View History

2014-02-21 08:29:18 +08:00
var Cylon = require('../..');
Cylon.robot({
connection: {
name: 'digispark',
adaptor: 'digispark'
},
device: {
name: 'led',
driver: 'led',
pin: 1
},
work: function(my) {
return every(1..second(), function() {
return my.led.toggle();
});
}
}).start();