Skip to content

Instantly share code, notes, and snippets.

David Resseguie Resseguie

Block or report user

Report or block Resseguie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sparkio-test.js
var five = require("johnny-five");
var Spark = require("spark-io");
var board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
})
});
View sparkio-servo-cli.js
var Spark = require('spark-io');
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var board = new Spark({
View servo-zero-error.js
var Spark = require("spark-io");
var board = new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
});
board.on("ready", function() {
console.log("CONNECTED");
this.pinMode("D0", this.MODES.OUTPUT);
View sparkio-led.js
var five = require("johnny-five");
var Spark = require("spark-io");
var board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
})
});
View rgb.js
var five = require("johnny-five");
var Spark = require("../lib/spark");
var board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
})
});
@Resseguie
Resseguie / servo-prompt.js
Created Jun 3, 2014
Simple example using spark-io and continuous servo
View servo-prompt.js
var Spark = require('../lib/spark');
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var board = new Spark({
@Resseguie
Resseguie / spark-io-rgb.js
Created Jun 3, 2014
Spark-IO LED-RGB Example
View spark-io-rgb.js
var five = require("johnny-five"),
Spark = require("../lib/spark"),
keypress = require('keypress'),
board;
// Create Johnny-Five board connected via Spark
board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
@Resseguie
Resseguie / led-pulse.js
Created Jun 6, 2014
Demonstrates no default pulse rate for RGB
View led-pulse.js
var five = require("johnny-five");
five.Board().on("ready", function() {
// Defaults to pin 11 (must be PWM)
var led = new five.Led(11);
var rgb = new five.Led.RGB([3,5,6]);
led.pulse();
rgb.pulse();
View rgb-led-on.js
var five = require('johnny-five'),
Spark = require('../lib/spark'),
board;
// Create Johnny-Five board connected via Spark
board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
@Resseguie
Resseguie / servo-a0.js
Created Jun 6, 2014
demonstrate servo on Spark A0
View servo-a0.js
var five = require("johnny-five"),
Spark = require("../lib/spark"),
board;
// Create Johnny-Five board connected via Spark
board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
You can’t perform that action at this time.