User manual

24
Each colour has its own
f
unction within the Sketch. Below, the
f
unction rot(
)
is
p
resente
d
:
v
oid rot()
{
Serial.println(„Red“)
;
analogWrite
(
redPin, HIGH
);
analo
g
Write(
g
reenPin, LOW);
analogWrite(bluePin, LOW)
;
}
The A
pp
T
he associated App is contained in fi le RGB.ai
a
. Import the fi le into AI2
.
Dependin
g
on the buttons pushed, a correspondin
g
text is sent via the Bluetooth interface:
For re
d
, red\n is sent, for blue,
b
lue\n is sent, for green, green
\
n
i
s sent and for switching
o
ff
, off\n
is
se
n
t.
T
he LED is switched via
f
our buttons
.
T
h
e
b
l
oc
k
s
in
t
h
e
AI2
15007-3 Conrad Adventskalender Internet of Things 2017_en.indd 2415007-3 Conrad Adventskalender Internet of Things 2017_en.indd 24 13.08.2017 17:03:1113.08.2017 17:03:11