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