Last active
August 29, 2015 14:27
-
-
Save iamdustan/0fa5d7b9bb9854fa6728 to your computer and use it in GitHub Desktop.
Random demos to test react-hardware against Johnny-5
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 five = require("johnny-five"); | |
| var board = new five.Board(); | |
| board.on("ready", function() { | |
| // Create an Led on pin 13 | |
| var led = new five.Led(9); | |
| // Blink every half second | |
| led.pulse(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
| var five = require("johnny-five"); | |
| var board = new five.Board(); | |
| board.on("ready", function() { | |
| var servo = new five.Servo(9); | |
| servo.sweep(); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment