UNPKG
johnny-five-electron
Version:
latest (0.9.1)
0.9.1
0.9.0
0.8.94
0.8.93
0.8.92
Temporary fork to support Electron (to be deprecated)
johnny-five.io
aessig/johnny-five
johnny-five-electron
/
eg
/
light-ambient-EVS_NXT.js
14 lines
(11 loc)
•
286 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
five =
require
(
"../lib/johnny-five.js"
);
var
board =
new
five.
Board
(); board.
on
(
"ready"
,
function
(
) {
var
light =
new
five.
Light
({
controller
:
"EVS_NXT"
,
pin
:
"BAS2"
}); light.
on
(
"change"
,
function
(
) {
console
.
log
(
"Ambient Light Level: "
,
this
.
level
); }); });