UNPKG
bot-io
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.1.1
0.1.0
ADC, GPIO, PWM, UARTs, and more on the BeagleBone Black.
github.com/fivdi/bot-io
fivdi/bot-io
bot-io
/
example
/
heartbeat-onboard-leds.js
17 lines
(12 loc)
•
280 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
;
var
bot =
require
(
'../'
),
Led
= bot.
Led
, leds; leds = [
Led
.
USR0
,
Led
.
USR1
,
Led
.
USR2
,
Led
.
USR3
].
map
(
function
(
usrledName
) {
return
new
Led
(usrledName); }); bot.
once
(
'ready'
, leds,
function
(
) { leds.
forEach
(
function
(
led
) { led.
heartbeat
(); }); });