Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Last active June 2, 2016 19:52
Show Gist options
  • Select an option

  • Save rwaldron/3c9b7e703a723a1d15ce9d6f42dc8530 to your computer and use it in GitHub Desktop.

Select an option

Save rwaldron/3c9b7e703a723a1d15ce9d6f42dc8530 to your computer and use it in GitHub Desktop.
Experiment 1: Blink an LED
var board = new five.Board({
io: new Tessel()
});
var Tessel = require("tessel-io");
var five = require("johnny-five");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("a5");
led.blink(500);
});
// Johnny-Five initializes all Board objects
// asynchronously, so once the board is _ready_
// we can safely interact with it.
board.on("ready", function() {
// ...
});
var Tessel = require("tessel-io");
var five = require("johnny-five");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment