23 lines
444 B
CoffeeScript
23 lines
444 B
CoffeeScript
|
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()
|