User manual
14
W
hen the IoT-board receives data, the
f
ollowing
l
oo
p
will be
p
erformed:
while(HC05.available() > 0){
…
Text=””;
}
N
ow enter a call for the function to be programmed
h
ookRec
(
Text
)
be
f
o
r
e
t
h
e
l
ast
lin
e:
while
(
HC05.available
()
> 0
)
{
…
hookRec(Text);
Text=
””
;
}
I
n this
f
unction, you can now output the received
t
ext via the wireless inter
f
ace:
v
oid hookRec(Strin
g
text)
{
if (text.startsWith(“echo”) || text.startsWith(“Echo”)) {
HC05.print
(
“>> “ + text
)
;
}
}
N
ow you can insta
ll
t
h
e program on t
h
e IoT-
b
oar
d
. Switc
h
on B
l
uetoot
h
at your Smartp
h
one an
d
s
e
l
ect t
h
e new
l
y esta
bl
is
h
e
d
B
l
uetoot
h
networ
k
. You can see t
h
e correspon
d
ing name in t
h
e seria
l
m
onitor of the Arduino IDE. Open the respective window via To o
l
s/Seria
l
monito
r
. W
h
en con-
n
ecting, you nee
d
to enter a passwor
d
; you can see t
h
e passwor
d
in t
h
e seria
l
monitor as we
ll
.
N
ow start the Bluetooth-App you installed before. After starting, go to the menu
(
three dashes on
t
op of each other at the left edge
)
of the App and select the menu item B
luetooth
D
e
vi
ces
.
N
ow se
l
ect t
h
e correspon
d
ing networ
k
an
d
switc
h
to t
h
e termina
l
b
y c
l
ic
k
ing t
h
e menu icon once
a
n
d
t
h
en se
l
ectin
g
Termina
l
.
I
n the terminal, click the connection s
y
mbol
(
to the left of the
g
arba
g
e bin
)
. After a short moment,
y
ou will be asked to enter the password. It is 12
34
.
Th
e
co
nn
ect
i
o
n
ca
nn
ot
be
estab
li
s
h
ed
t
h
e
fi
rst time; there
f
ore, click the icon a
g
ain. Now the connection should be established. The terminal
w
indow will show the message
Co
nn
ected
.
Now you can communicate with the IoT-board
.
T
h
e
co
nn
ect
i
o
n m
ust
be
estab
li
s
h
ed
t
wi
ce
A
s lon
g
as
y
ou have not entered a password in the Bluetooth-App,
y
ou need to establish the
connection twice. The fi rst time,
y
ou enter the password. The second time, the connection is
establ
i
shed
.
If
you now enter
Led off
and push the arrow icon, the two LEDs will be switched off. Entering
f
L
e
d
o
n
wi
ll
switc
h
t
h
e LEDs on again. Every input starting ec
ho
wi
ll
b
e sent to t
h
e
b
oar
d
, w
h
ic
h
wi
ll
return t
h
e input starting wit
h
two arrows. T
h
e text is t
h
en output on t
h
e termina
l.
T
h
e
n
a
m
e
o
f
t
h
e
n
et
w
o
rk i
s
Bluethin
g
103 and the
p
assword is 12
3
4
.
Use t
h
e centra
l
menu to get to t
h
e App settings.
T
he Terminal-App is now read
y
for communication.
Y
ou
ca
n
a
l
so
fi n
d
t
h
e
n
et
w
o
rk
o
f
t
h
e
I
o
T-
boa
r
d
in
t
h
e
li
st
o
f
t
h
e
Bl
uetoot
h n
et
w
o
rk
s.
ec
ho
shows that the App can also receive in
f
ormation
f
rom the IoT-board
.
15007-3 Conrad Adventskalender Internet of Things 2017_en.indd 1415007-3 Conrad Adventskalender Internet of Things 2017_en.indd 14 13.08.2017 17:03:0413.08.2017 17:03:04










