Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 49 lines (34 sloc) 0.821 kb
329525f Rick Waldron Add removal delimiters to eg template. Update examples
authored
1 <!--remove-start-->
e08f482 Rick Waldron Regenerate examples with improved titles
authored
2 # REPL
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
3
4 Run with:
5 ```bash
6 node eg/repl.js
7 ```
329525f Rick Waldron Add removal delimiters to eg template. Update examples
authored
8 <!--remove-end-->
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
9
10 ```javascript
16efe14 Rick Waldron Examples: broad cleanups
authored
11 var five = require("johnny-five");
12 var board = new five.Board();
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
13
14 board.on("ready", function() {
16efe14 Rick Waldron Examples: broad cleanups
authored
15 console.log("Ready event. Repl instance auto-initialized!");
16
17 var led = new five.Led(13);
1b7af18 Rick Waldron Change "Breadboard" heading to "Breadboard/Illustration"
authored
18
81c772a Rick Waldron REPL and Board updates for process closing, error handling etc.
authored
19 this.repl.inject({
16efe14 Rick Waldron Examples: broad cleanups
authored
20 // Allow limited on/off control access to the
21 // Led instance from the REPL.
22 on: function() {
23 led.on();
24 },
25 off: function() {
26 led.off();
27 }
81c772a Rick Waldron REPL and Board updates for process closing, error handling etc.
authored
28 });
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
29 });
30
31 ```
32
5e929ce Rick Waldron Example program updates
authored
33
938e295 Rick Waldron Removes @device tags and replaces with arbitrary @markdown regions
authored
34 ## Breadboard/Illustration
5e929ce Rick Waldron Example program updates
authored
35
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
36
938e295 Rick Waldron Removes @device tags and replaces with arbitrary @markdown regions
authored
37 ![docs/breadboard/repl.png](breadboard/repl.png)
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
38
39
40
41
329525f Rick Waldron Add removal delimiters to eg template. Update examples
authored
42 <!--remove-start-->
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
43 ## License
8c167ba Rick Waldron Update copyright year
authored
44 Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com>
6ee1faa Rick Waldron Regenerate the docs examples
authored
45 Licensed under the MIT license.
8c167ba Rick Waldron Update copyright year
authored
46 Copyright (c) 2014, 2015 The Johnny-Five Contributors
6b5ab5b Rick Waldron Rebuild all example program markdown files
authored
47 Licensed under the MIT license.
329525f Rick Waldron Add removal delimiters to eg template. Update examples
authored
48 <!--remove-end-->
Something went wrong with that request. Please try again.