matrix.brightness(5)
'matrix.setup(5,1) 'CS,180
gosub [tmp]
p = 104
u = "www.ard-text.de/mobil/"
h1 = "
"
h2 = "
"
h3 = "Seite nicht vorhanden!"
timer 7000,[tm]
wait
[tm]
h1 = ""
h2 = "
"
s = wgets(u & str(p))
l = len(s)
gosub [dbg]
if l <> 0 then p = p + 1
a = instr(s,h1)
b = instr(s,h2)
c = mid(s,a,b-a)
c = replace(c,h1,"")
c = replace(c,h2,"")
if instr(c,h3) = 0 && len(c)>0 then
print c
c = time("hour:min") & " " & c
matrix.print(c,20,1,0)
else
p = 104
print "----------------------------------"
cls
matrix.print("ARD-TEXT-TICKER PI PICO ESP BASIC " & ip(),15,32,0)
matrix.print(time("hour:min"),0,2)
timer 1000,[sec]
i = 1
end if
wait
[sec]
t$ = time("min:sec")
matrix.print(t$,0,2)
i = i + 1
if i < 10 then
wait
end if
gosub [tmp]
timer 7000,[tm]
wait
[dbg]
'192.168.178.59 STA vs. 192.168.42.1 AP
if (val(word(ip(),4,".")) <=1) then
wifi.connect("FRITZ!Box...", "0123456789")
end if
'matrix.print(str(l),0,2)
matrix.print(time("hour:min"),0,2)
if time("min") = "06" or (s = "connection failed") then
gosub [tmp]
reboot
end if
delay 500
return
[tmp]
t = int((io(ai,3)-5)*10)/10
matrix.print(replace(str(t)&"C",".",","),0,2)
return