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
/
tinkerkit-linear-pot.js
8 lines
(6 loc)
•
201 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
var
five =
require
(
"../lib/johnny-five.js"
);
new
five.
Board
().
on
(
"ready"
,
function
(
) {
new
five.
Sensor
(
"I0"
).
scale
(
0
,
255
).
on
(
"data"
,
function
(
) {
console
.
log
(
Math
.
round
(
this
.
value
)); }); });