Last active
June 2, 2016 19:52
-
-
Save rwaldron/3c9b7e703a723a1d15ce9d6f42dc8530 to your computer and use it in GitHub Desktop.
Experiment 1: Blink an LED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var board = new five.Board({ | |
| io: new Tessel() | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Johnny-Five initializes all Board objects | |
| // asynchronously, so once the board is _ready_ | |
| // we can safely interact with it. | |
| board.on("ready", function() { | |
| // ... | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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