diff --git a/README.md b/README.md index 93269a0..d8a976f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/blinkm.coffee b/examples/blinkm.coffee new file mode 100644 index 0000000..c3a2881 --- /dev/null +++ b/examples/blinkm.coffee @@ -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()