Fixing the example
This commit is contained in:
parent
7fc9fec673
commit
4fd5c4e74f
|
@ -14,10 +14,10 @@ var cylon = require("cylon");
|
||||||
|
|
||||||
// Initialize the robot
|
// Initialize the robot
|
||||||
var robot = cylon.robot({
|
var robot = cylon.robot({
|
||||||
connection : { name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0' },
|
connection: { name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0' },
|
||||||
device : { name: 'led', driver: 'led', pin: 13 },
|
device: { name: 'led', driver: 'led', pin: 13 },
|
||||||
|
|
||||||
work : function() {
|
work: function() {
|
||||||
// we do our thing here
|
// we do our thing here
|
||||||
every(1.second(), function() { led.toggle(); });
|
every(1.second(), function() { led.toggle(); });
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ robot = cylon.robot
|
||||||
device:
|
device:
|
||||||
name: 'led', driver: 'led', pin: 13
|
name: 'led', driver: 'led', pin: 13
|
||||||
|
|
||||||
work : ->
|
work: ->
|
||||||
# we do our thing here
|
# we do our thing here
|
||||||
every 1.second(), ->
|
every 1.second(), ->
|
||||||
led.toggle()
|
led.toggle()
|
||||||
|
|
Loading…
Reference in New Issue