User manual
27
12t
h
Da
y
In the Advent calendar today
•1x LED orange with dropping resisto
r
Setting the running light speed by Ap
p
In toda
y
’s pro
j
ect,
y
ou will control the speed o
f
a runnin
g
li
g
ht
with the App
.
C
omponents: 1x board, 1xLED red with dropping resistor,
1xLED orange with dropping resistor, 1xLED green with
dropping resistor, 1xjumpe
r
T
h
e S
k
etc
h
The program
f
or this day is Tag12.in
o
and located in directory
T
ag1
2
.
To control the running light, you need two parameters:
The waiting time while another LED is lit and the number o
f
passes. These values are sent by the App in a string in the
f
orm
wTTTdNN. For exam
p
le, w500d4 means that each LED will be
li
t
fo
r
500
m
s
a
n
d
t
h
at
t
h
e
r
e
will
be
a
500
m
s
b
r
ea
k
befo
r
e
activating another LED. This running light would go through the sequence
f
our times
:
if
(
Text.indexOf
(
“w”
)
!= -1 && Text.indexOf
(
“d”
)
!= -1
)
{
String temp = Text.substring
(
Text.indexOf
(
“w”
)
+1,Text.indexOf
(
“d”
))
;
int wartezeit = temp.toInt()
;
temp = Text.substring
(
Text.indexOf
(
“d”
)
+1
);
int durchlaeufe = temp.toInt
()
;
laufl icht(wartezeit
,
durchlaeufe)
;
}
T
h
e Ap
p
T
h
e va
l
ues are su
b
mitte
d
using t
h
e App
S
eria
l
B
l
uetoot
h
Termina
l
.
After connecting, you can
send the command directly to the IoT-board in the form as described
.
R
unning
l
ig
h
t wit
h
t
h
ree LEDS: re
d
, orange an
d
green.
T
h
e out
p
ut s
h
ows t
h
at two connection attem
p
ts are
needed
f
or success
f
ully connecting to the IoT-board.
I
f
the connection does not work, check the menu
ite
m B
luetooth
D
e
vi
ces
to see t
h
at you
h
ave c
h
osen
the right device.
12. Day
15007-3 Conrad Adventskalender Internet of Things 2017_en.indd 2715007-3 Conrad Adventskalender Internet of Things 2017_en.indd 27 13.08.2017 17:03:1313.08.2017 17:03:13










