cylon/examples/test.js

16 lines
363 B
JavaScript

var cylon = require("cylon");
// Initialize the robot
var robot = cylon.robot({
connection: { name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0' },
device: { name: 'led', driver: 'led', pin: 13 },
work: function() {
// we do our thing here
every(1.second(), function() { console.log("ehlo"); });
}
});
// start working
robot.start();