File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,15 @@ node eg/led-array.js
31
31
32
32
33
33
``` javascript
34
- var five = require (" johnny-five" );
35
- var board = new five. Board ();
34
+ const { Board , Leds } = require (" johnny-five" );
35
+ const board = new Board ();
36
36
37
37
board .on (" ready" , function () {
38
- var array = new five. Leds ([3 , 5 , 6 ]);
38
+ const array = new Leds ([3 , 5 , 6 ]);
39
39
40
40
array .pulse ();
41
41
});
42
42
43
-
44
43
```
45
44
46
45
Original file line number Diff line number Diff line change 1
- var five = require ( "../lib/johnny-five.js" ) ;
2
- var board = new five . Board ( ) ;
1
+ const { Board , Leds } = require ( "../lib/johnny-five.js" ) ;
2
+ const board = new Board ( ) ;
3
3
4
4
board . on ( "ready" , function ( ) {
5
- var array = new five . Leds ( [ 3 , 5 , 6 ] ) ;
5
+ const array = new Leds ( [ 3 , 5 , 6 ] ) ;
6
6
7
7
array . pulse ( ) ;
8
8
} ) ;
9
-
10
9
/* @markdown
11
10
12
11
Control multiple LEDs at once by creating an LED collection (`Leds`).
You can’t perform that action at this time.
0 commit comments