cylon/examples/sphero_messages.coffee

23 lines
444 B
CoffeeScript
Raw Normal View History

2013-10-25 07:19:15 +08:00
Cylon = require('..')
Cylon.robot
connection:
name: 'sphero', adaptor: 'sphero', port: '/dev/rfcomm0'
device:
name: 'sphero', driver: 'sphero'
work: (me) ->
me.sphero.on 'connect', ->
Logger.info 'party started...'
me.sphero.on 'message', (data) ->
Logger.info 'message:'
Logger.info data
me.sphero.on 'notification', (data) ->
Logger.info 'notification:'
Logger.info data
.start()