Cylon adaptor for the Particle Core & Photon device
It uses the built-in Tinker protocol via the Spark.js library thank you!
Want to use Ruby on robots? Check out our sister project Artoo (http://artoo.io)
Want to use the Go programming language to power your robots? Check out our sister project Gobot (http://gobot.io).
Install the module with:
$ npm install cylon cylon-spark
You'll need your
device_id to push new software to yourSpark, and you can get both of these from Spark's Build tool.
You will need to install the appropriate firmware on your Spark Core to use it from Cylon.js.
One option is to use the Tinker software, which has the same API as the "default.cpp" code that is included with the Gort CLI (http://gort.io). This routes all of your calls thru the Spark cloud, with is appropriate for communicating with Spark devices in a remote location.
Another option is to use the VoodooSpark firmware, which has its own binary API. This discovers your device thru the Spark cloud, and then routes all of your calls directly to the Spark Core device. This is appropriate for communicating with Spark devices on the same local subnet as the computer that you wish to control them from.
For more information on how to program your Spark, please see Spark's examples.
For more information about VoodooSpark, click here.
var Cylon = require'cylon';// Initialize the robotCylonrobotconnections:spark: adaptor: 'spark' accessToken: 'XYZPDQ123' deviceId: '123ABC456'devices:led: driver: 'led' pin: 'D0'every1second myledtoggle;start;
var Cylon = require'cylon';// Initialize the robotCylonrobotconnections:voodoospark:adaptor: 'voodoospark'accessToken: 'XYZPDQ123'deviceId: '123ABC456'module: 'cylon-spark'devices:led: driver: 'led' pin: 'D0'every1second myledtoggle;start;
The setup process for the Spark core is fully explained by their docs, and requires only an active internet connection with a WiFi access point.
Once your Spark is connected, you can get the
deviceId necessary to communicate with it from Cylon.
We're busy adding documentation to our web site at http://cylonjs.com/ please check there as we continue to work on Cylon.js
For our contribution guidelines, please go to https://github.com/hybridgroup/cylon/blob/master/CONTRIBUTING.md .
For the release history, please go to https://github.com/hybridgroup/cylon-spark/blob/master/RELEASES.md .
Copyright (c) 2013-2015 The Hybrid Group. Licensed under the Apache 2.0 license.