cylon/examples/blink.coffee

16 lines
280 B
CoffeeScript

Cylon = require('..')
# Initialize the robot
Cylon.robot
connection:
name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0'
device:
name: 'led', driver: 'led', pin: 13
work: (my) ->
# we do our thing here
every 1.second(), -> my.led.toggle()
.start()