User manual

33
16t
h
Da
y
In the Advent calendar today
•1x
ashing LED red with dropping resisto
r
Controlling the
ashing LED with the Ap
p
Switch the
ashin
g
LED on with a button and o
ff
a
g
ain with
a
n
ot
h
e
r
butto
n
.
C
omponents: 1x board, 1xfl ashing LED red with droppin
g
res
i
sto
r
T
h
e S
k
etc
h
The program
f
or this day is Tag16.in
o
and located in directory
T
ag1
6
. Th
e
S
k
etc
h r
eacts
to
On
a
n
d
Off
f
r
o
m
t
h
e
wir
e
l
ess
in
te
r-
face:
if (Text.startsWith(“On”) || Text.startsWith(“ON”)
|| Text.startsWith(“on”)){
an()
;
}
else if (Text.startsWith(“Off”) || Text
.
startsWith(“OFF”) || Text.startsWith(“off”))
{
aus()
;
}
The fl ashing LED is switched in two separate functions. Only the value L
O
W
or
H
I
GH
i
s wr
i
tten
v
i
a d
igi
talWr
i
t
e
.
void an
()
{
Serial.println
(
„An“
)
;
digitalWrite
(
blinkPin, HIGH
);
}
void aus
()
{
Serial.println
(
„Aus“
)
;
digitalWrite(blinkPin, LOW)
;
}
T
h
e A
pp
T
h
e A
pp
Bl
ink
e
r
.a
i
a
has two buttons
f
or switchin
g
the
ashin
g
LED on and o
ff
.
The alread
y
-familiar method
call
B
luetoot
h
.Se
n
d
T
e
x
t
is used for sendin
g
.
Remem
b
er t
h
at you nee
d
to attac
h
t
h
e en
d
criterion to t
h
e string w
h
en sen
d
ing
.
T
he fl ashing LED also has a dropping resistor and therefore does not need any further elements
f
or the circuit
.
There is a
VerticalArrangement
above the two buttons (on
t
and off
)
as a positioning element
.
16. Day
15007-3 Conrad Adventskalender Internet of Things 2017_en.indd 3315007-3 Conrad Adventskalender Internet of Things 2017_en.indd 33 13.08.2017 17:03:1613.08.2017 17:03:16