cylon-spark
Version:
Cylon adaptor for the Particle Core & Photon device
24 lines (19 loc) • 406 B
JavaScript
;
var Cylon = require("cylon");
Cylon.robot({
connections: {
spark: {
adaptor: "spark",
accessToken: "[YOUR_ACCESS_TOKEN]",
deviceId: "[YOUR_DEVICE_ID]"
}
},
devices: {
spark: { driver: "spark" }
},
work: function(my) {
my.spark.onEvent("testevent", function(data) {
console.log("Test Event Received. Data:", data);
});
}
}).start();