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
/
toggle.js
16 lines
(11 loc)
•
210 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const
LED
=
require
(
'../index'
);
const
led =
new
LED
(
5
);
setInterval
(
() =>
{ led.
toggle
(); },
1000
); process.
on
(
'SIGTERM'
,
() =>
{ process.
exit
(); }); process.
on
(
'SIGINT'
,
() =>
{ process.
exit
(); });