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
@Resseguie
Resseguie / spark-temp.js
Last active Aug 29, 2015
Voodoospark #23 code
View spark-temp.js
var cylon = require('cylon');
cylon.robot({
connection: {
name: 'voodoospark',
adaptor: 'voodoospark',
accessToken: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID,
module: 'spark'
},
@Resseguie
Resseguie / piezo-scale.js
Created Jun 10, 2014
Simple scale based on J5 piezo API
View piezo-scale.js
var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(process.argv[2] || 3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
View gist:ad155ba7a7c24bd1c719
var five = require("../lib/johnny-five.js"),
board = new five.Board();
board.on("ready", function() {
// Creates a piezo object and defines the pin to be used for the signal
var piezo = new five.Piezo(3);
// Injects the piezo into the repl
board.repl.inject({
piezo: piezo
@Resseguie
Resseguie / led-demo-sequence.js
Created Jun 6, 2014
led demo sequence example
View led-demo-sequence.js
var five = require("johnny-five"),
board = new five.Board(),
led;
var demoSequence = [{
method: "pulse",
args: [1000],
duration: 5000
}, {
@Resseguie
Resseguie / led-analog.js
Last active Aug 29, 2015
demo basic LED analog methods
View led-analog.js
var five = require("johnny-five");
five.Board().on("ready", function() {
// Defaults to pin 11 (must be PWM)
var led = new five.Led(process.argv[2] || 11);
// Pulse the LED every half second
console.log("led.pulse(500)");
led.pulse(500);
@Resseguie
Resseguie / led-digital.js
Last active Aug 29, 2015
demo basic LED digital methods
View led-digital.js
var five = require("johnny-five");
five.Board().on("ready", function() {
// Defaults to pin 13
var led = new five.Led(process.argv[2] || 13);
// Turn on the LED
console.log("led.on()");
led.on();
@Resseguie
Resseguie / led-demo.js
Last active Aug 29, 2015
Demo sequence for showing off five.Led
View led-demo.js
var five = require("johnny-five"),
keypress = require("keypress");
var step = 0;
var demoSequence = [{
method: "pulse",
args: [1000]
}, {
method: "strobe",
args: [500]
@Resseguie
Resseguie / button-led.js
Last active Aug 29, 2015
Demonstrates button (isPullup true) and led together
View button-led.js
var five = require("johnny-five"),
button, led;
five.Board().on("ready", function() {
led = new five.Led(4);
setInterval(function() {
led.toggle();
}, 100);
@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();
@Resseguie
Resseguie / rgb-pulse.js
Created Jun 6, 2014
Led.RGB.pulse() doesn't honor .color()
View rgb-pulse.js
var five = require("johnny-five");
five.Board().on("ready", function() {
var led = new five.Led.RGB({
pins: {
red: 3,
green: 5,
blue: 6
}
You can’t perform that action at this time.