UNPKG
robotois-led
Version:
latest (1.0.6)
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Library for managing the state of a LED.
github.com/Robotois/robotois-led
Robotois/robotois-led
robotois-led
/
tests
/
write.js
17 lines
(12 loc)
•
223 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const
LED
=
require
(
'../index'
);
const
led =
new
LED
(
4
); led.
write
(
1
);
setTimeout
(
() =>
{ led.
write
(
0
); },
2000
); process.
on
(
'SIGTERM'
,
() =>
{ process.
exit
(); }); process.
on
(
'SIGINT'
,
() =>
{ process.
exit
(); });