Add reference to i2c drivers to readme

This commit is contained in:
deadprogram 2013-11-03 19:18:06 -08:00
parent 9692b4fd90
commit 472384ee4b
2 changed files with 32 additions and 1 deletions

View File

@ -63,10 +63,14 @@ Cylon.js has a extensible system for connecting to hardware devices. The followi
- [Ardrone](http://ardrone2.parrot.com/) <=> [Adaptor](https://github.com/hybridgroup/cylon-ardrone)
- [Sphero](http://www.gosphero.com/) <=> [Adaptor](https://github.com/hybridgroup/cylon-sphero)
Support for common shared device drivers, is provded using the General Purpose Input/Output (GPIO) module:
Support for many devices that use General Purpose Input/Output (GPIO) have a shared set of drivers provded using the cylon-gpio module:
- [GPIO](https://en.wikipedia.org/wiki/General_Purpose_Input/Output) <=> [Drivers](https://github.com/hybridgroup/cylon-gpio)
Support for devices that use Inter-Integrated Circuit (I2C) have a shared set of drivers provded using the cylon-i2c module:
- [I2C](https://en.wikipedia.org/wiki/I%C2%B2C) <=> [Drivers](https://github.com/hybridgroup/cylon-i2c)
More platforms and drivers are coming soon...
## Documentation

27
examples/blinkm.coffee Normal file
View File

@ -0,0 +1,27 @@
Cylon = require('..')
# Initialize the robot
Cylon.robot
connection:
name: 'arduino', adaptor: 'firmata', port: '/dev/ttyACM0'
device:
name: 'blinkm', driver: 'blinkm'
work: (my) ->
# we do our thing here
my.blinkm.on 'start', ->
Logger.info 'started...'
my.blinkm.off()
lit = false
every 1.second(), ->
if lit
lit = false
Logger.info 'on'
my.blinkm.rgb 0xaa, 0, 0
else
lit = true
Logger.info 'off'
my.blinkm.rgb 0, 0, 0
.start()