Rudraksh M.K.
Historian. Linguist. Writer. Coder. Mathematician. Founder @ http://MathHarbor.com
npm install cylon
npm install cylon-firmata
var Cylon = require("cylon");
// Initialize the robot
var robot = Cylon.robot({
// Change the port to the correct port for your Arduino.
connection: { name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0' },
device: { name: 'led', driver: 'led', pin: 13 },
work: function(my) {
// we do our thing here
every((1).second(), function() { my.led.toggle(); });
}
});
robot.start();
npm install cylon-ardrone
var Cylon = require('cylon');
Cylon.robot({
connection: { name: 'ardrone', adaptor: 'ardrone', port: '192.168.1.1' },
device: { name: 'drone', driver: 'ardrone' },
work: function(my) {
my.drone.takeoff();
after(10..seconds(), function() { my.drone.land(); });
after(15..seconds(), function() { my.drone.stop(); });
}
}).start();
By Rudraksh M.K.
Historian. Linguist. Writer. Coder. Mathematician. Founder @ http://MathHarbor.com