WordClocks with NeoPixel-Matrix
WordClocks with 8*8 or 10*10 NeoPixel-Matrix, ESP8266 and a BASIC-Program based on ANNEX WiFi-RDS . Matrixes are made with Laserprinter or 3D-Printer.
During the last year I built some WordClocks for some friends who saw the one I built first and fell in love with it.
This resulted in some different versions with 8x8, 8x8+4 or 10x10 NeoPixel matrix in various housings - So it was fortunately no mass production ;-)
The display masks of the clocks are made with Laserprinter or 3D-Printer). These are in German language, but there are masks in other languages available on the net and the BASIC-program can be adapted accordingly .
The different types of matrixes are controlled by the same BASIC-program and Webinterface.
With the webinterface the type of display and the color and brightness of active and inactive words can be adjusted.
The settings are saved for the next reboot.
Programming is based on a BASIC-Script and ANNEX-WiFi-RDS for any ESP8266-Controler-module (e.g.: Wemos D1 Mini).
The program text is currently still somewhat German in the variable names and comments
This is what some of the results look like:
https://vimeo.com/221749384
https://vimeo.com/368983581
https://vimeo.com/221750564
The BASIC code for the ESP8266 is created very easily with ANNEX WiFi RDS and looks like this
' W o r d C l o c k mit 10x10- und 8*8-Matrix
' Peter.Neufeld@me.com
' JANUAR 2018(ESPbasic) // NOVEMBER 2019(ANNEX-RDS)
' 10x10 oder 8x8(+4) NeoPixel an !!!!GPIO02 = D04!!!!!
' 8x8+4 = mit 8x8 mit 4 zusaetzlichen Minuten LEDs
' Zeigt beim Start die IP-Adresse als Stunden an
' TYPUS=[10x10|8x8|8x8+4] in EEPROM gespeichert
' Sommer-/Winterzeit automatisch
' (CET-1CEST,M3.5.0,M10.5.0/3 in config-page)
ver$ = "V7.2 ANNEX"
zeit$ = time$
gosub STARTWERTE
gosub HW_TYPUS
gosub NEO_SETUP
gosub WebInterface
timer0 4000 , WebInterface
gosub ShowIPADR
onhtmlreload WebInterface
onhtmlchange WebInterface
' Falls keine Verbindung zu einem WALAN besteht
' und keine NTP-Zeit geholt werden konnte:
' DEMO-Modus und rote Anzeige
if IPADR$="192.168.4.1" then
MODUS$ = "DEMO"
R = 50
G = 0
B = 0
else
MODUS$ = "UHR"
end if
' !!!!!!!!!!!!!
option.WDT 10000 ' set the WDT at 10 seconds
timer0 2000, MAIN_PRGM
wait
' ##############################################################
MAIN_PRGM:
'wlog "MAIN_PRGM", time$
option.WDTreset
zeit$ = time$
if MODUS$ = "UHR" then COLOR$ = "NEIN"
if MODUS$ = "COLOR_DEMO" then
timer0 0
gosub color_demo
pause 3000
timer0 2000, MAIN_PRGM
MODUS$ = "UHR"
R_alt = R_alt + 1
endif
if (MODUS$ = "UHR") or (MODUS$ = "UHR_MIT_COLOR_WECHSEL") then
mm = val(word$(time$,2,":"))
end if
if MODUS$ = "DEMO" then
COLOR$ = "NEIN"
mm = mm + 3
if mm > 59 then
mm = 0
hh = hh+1
if hh > 12 then hh = 1
end if
end if
ss = val(word$(time$,3,":"))
if (MODUS$ = "UHR") or (MODUS$ = "UHR_MIT_COLOR_WECHSEL") then
hh = val(word$(time$,1,":"))
end if
If hh = 0 then
hh = 12
end if
if hh >12 then hh = hh - 12
mm_mod = mm
if ( RX <> RX_alt ) or ( GX <> GX_alt ) or ( BX <> BX_alt ) then
RX_alt = RX
GX_alt = GX
BX_alt = BX
NEO.STRIP LED_start,LED_end,RX,GX,BX
R_alt = R_alt + 1
end if
if TYPUS$ <> TYPUS_alt$ then
gosub HW_TYPUS
TYPUS_alt$ = TYPUS$
mm_alt = mm_alt + 1
NEO.STRIP LED_start,LED_end,RX,GX,BX
end if
'komplexe Uhrzeitumsetzung fuer neopixel nur ansteuern, wenn sich etwas geaendert hat
if ( hh <> hh_alt ) or (mm <> mm_alt) or ( R <> R_alt ) or ( G <> G_alt ) or ( B <> B_alt ) then
hh_alt = hh
mm_alt = mm
R_alt = R
G_alt = G
B_alt = B
If(TYPUS$ = "8x8+4") then
mm_mod = mm_mod mod 5
if mm_mod > 0 then
NEO.STRIP LED_end +1,LED_end + mm_mod,R,G,B
NEO.STRIP LED_end + mm_mod + 1,LED_end + 5,RX,GX,BX
else
NEO.STRIP LED_end +1,LED_end + 5,RX,GX,BX
end if
endif
gosub showtime
else
' SMILY]
if LED_blink > 0 then
if ON = 1 then
ON = 0
NEO.STRIP LED_blink,LED_blink + 1,R/2,G/2,B/2
else
ON = 1
NEO.STRIP LED_blink,LED_blink + 1,R,G,B
end if
end if
end if
return
' #######################################################################
' #######################################################################
showtime:
if TYPUS$ = "10x10" then
gosub showtime_10x10
else
gosub showtime_8x8
end if
return
' #######################################################################
showtime_10x10:
'alles auf Hintergrund
NEO.STRIP 0,LED_END,RX,GX,BX,1
'ES:
NEO.STRIP 0,2,R,G,B,1
t$ = ""
'IST:
NEO.STRIP 3,5,R,G,B,1
'FUNF:
if ((mm >4) and (mm<10)) or ((mm >54) and (mm <60)) or ((mm >24) and (mm<30)) or ((mm >34) and (mm <40)) then
NEO.STRIP 6,9,R,G,B,1
t$ = t$ + "FUENF "
end if
'ZEHN:
if ((mm >9) and (mm<15)) or ((mm >49) and (mm <55)) then
NEO.STRIP 10,13,R,G,B,1
t$ = t$ + "ZEHN "
end if
'ZWANZIG:
if ((mm >19) and (mm<25)) or ((mm >39) and (mm <45)) then
NEO.STRIP 14,19,R,G,B,1
t$ = t$ + "ZWANZIG "
end if
'NACH1 nach-halb
if ((mm > 34) and (mm<40)) then
NEO.STRIP 20,23,R,G,B,1
t$ = t$ + "NACH "
end if
'VIERTEL:
if ((mm >14) and (mm<20)) or ((mm >44) and (mm <50)) then
NEO.STRIP 24,29,R,G,B,1
t$ = t$ + "VIERTEL "
end if
'VOR:
if ((mm >24) and (mm <30))or ((mm > 39) and (mm<60)) then
NEO.STRIP 30,32,R,G,B,1
t$ = t$ + "VOR "
end if
'NACH2:
if ((mm >4) and (mm<25)) then
NEO.STRIP 33,35,R,G,B,1
t$ = t$ + "NACH "
endif
'HALB:
if (mm>24) and (mm<40) then
NEO.STRIP 36,39,R,G,B,1
t$ = t$ + "HALB "
end if
' ab 5 vor halb immer stunde = stunde + 1
hhx=hh
if (mm >24) and (mm<60) then
hhx = hh+1
if hhx = 13 then
hhx = 1
end if
end if
'1
if hhx=1 then
NEO.STRIP 40,45,R,G,B,1
t$ = t$ + "EINS "
end if
'2
if hhx=2 then
NEO.STRIP 46,49,R,G,B,1
t$ = t$ + "ZWEI "
end if
'3
if hhx=3 then
NEO.STRIP 50,53,R,G,B,1
t$ = t$ + "DREI "
end if
'4
if hhx=4 then
NEO.STRIP 56,59,R,G,B,1
t$ = t$ + "VIER "
end if
'5
if hhx=5 then
NEO.STRIP 60,64,R,G,B,1
t$ = t$ + "FUENF "
end if
'6
if hhx=6 then
NEO.STRIP 65,69,R,G,B,1
t$ = t$ + "SECHS "
end if
'7
if hhx=7 then
NEO.STRIP 70,75,R,G,B,1
t$ = t$ + "SIEBEN "
end if
'8
if hhx = 8 then
NEO.STRIP 76,79,R,G,B,1
t$ = t$ + "ACHT "
end if
'9
if hhx = 9 then
NEO.STRIP 80,83,R,G,B,1
t$ = t$ + "NEUN "
end if
'10
if hhx = 10 then
NEO.STRIP 84,86,R,G,B,1
t$ = t$ + "ZEHN "
end if
'11
if hhx = 11 then
NEO.STRIP 87,89,R,G,B,1
t$ = t$ + "ELF "
end if
'12
if hhx = 12 then
NEO.STRIP 90,95,R,G,B,1
t$ = t$ + "ZWOELF "
end if
'UHR:
if mm <5 then
'bisher NEO.STRIP nur im RAM, nun mit refresh!!
NEO.STRIP 96,99,R,G,B,0
t$ = t$ + "UHR "
else
'bisher NEO.STRIP nur im RAM, nun mit refresh!!
NEO.STRIP 96,99,RX,GX,BX,0
end if
tt$ = t$
return
' #######################################################################
showtime_8x8:
'bis 4 nach:
if (mm<5) then
t$ = "genau "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,0 'HALB
goto STUNDEN
end if
'FUNF nach:
if (mm >4) and (mm<10) then
t$ = "FUENF nach "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,R,G,B,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
'ZEHN nach:
if (mm >9) and (mm<15) then
t$ = "ZEHN nach "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,R,G,B,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
'FUENFZEHN nach:
if (mm >14) and (mm<20) then
t$ = "FUENFZEHN nach "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,R,G,B,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
'ZEHN vor HALB:
if (mm >19) and (mm<25) then
t$ = "ZEHN vor HALB "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,R,G,B,1 'VOR
NEO.STRIP 16,19,R,G,B,1 'HALB
goto STUNDEN
end if
'FUENF vor HALB:
if (mm >24) and (mm<30) then
t$ = "FUENF vor HALB "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,R,G,B,1 'VOR
NEO.STRIP 16,19,R,G,B,1 'HALB
goto STUNDEN
end if
'HALB:
if (mm >29) and (mm<35) then
t$ = "HALB "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,R,G,B,1 'HALB
goto STUNDEN
end if
'FUENF nach HALB:
if (mm >34) and (mm<40) then
t$ = "FUENF nach HALB "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,R,G,B,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,R,G,B,1 'HALB
goto STUNDEN
end if
'ZEHN nach HALB:
if (mm >39) and (mm<45) then
t$ = "ZEHN nach HALB "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,R,G,B,1 'NACH
NEO.STRIP 8,10,RX,GX,BX,1 'VOR
NEO.STRIP 16,19,R,G,B,1 'HALB
goto STUNDEN
end if
'FUENFZEHN vor:
if (mm >44) and (mm<50) then
t$ = "FUENFZEHN vor "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,R,G,B,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
'ZEHN vor :
if (mm >49) and (mm<55) then
t$ = "ZEHN vor "
NEO.STRIP 0, 3,RX,GX,BX,1 'FUENF
NEO.STRIP 4, 7,R,G,B,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,R,G,B,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
'FUENF vor :
if (mm >54) and (mm<60) then
t$ = "FUENF vor "
NEO.STRIP 0, 3,R,G,B,1 'FUENF
NEO.STRIP 4, 7,RX,GX,BX,1 'ZEHN
NEO.STRIP 12,15,RX,GX,BX,1 'NACH
NEO.STRIP 8,10,R,G,B,1 'VOR
NEO.STRIP 16,19,RX,GX,BX,1 'HALB
goto STUNDEN
end if
STUNDEN:
' ab 10 vor halb immer stunde = stunde + 1
hhx=hh
if (mm >19) and (mm<60) then
hhx = hh+1
if hhx = 13 then
hhx = 1
end if
end if
NEO.STRIP 20,63,RX,GX,BX,1
'1
if hhx=1 then
NEO.STRIP 24,27,R,G,B,1
NEO.STRIP 28,63,RX,GX,BX,0
t$ = t$ + "EINS "
end if
'2
if hhx=2 then
NEO.STRIP 24,27,RX,GX,BX,1
NEO.STRIP 35,36,R,G,B,1
NEO.STRIP 45,46,R,G,B,0
t$ = t$ + "ZWEI "
end if
'3
if hhx=3 then
NEO.STRIP 35,36,RX,GX,BX,1
NEO.STRIP 43,46,R,G,B,0
t$ = t$ + "DREI "
end if
'4
if hhx=4 then
NEO.STRIP 20,23,R,G,B,1
NEO.STRIP 43,46,RX,GX,BX,0
t$ = t$ + "VIER "
end if
'5
if hhx=5 then
NEO.STRIP 20,23,RX,GX,BX,1
NEO.PIXEL 39,R,G,B,1
NEO.PIXEL 47,R,G,B,1
NEO.PIXEL 55,R,G,B,1
NEO.PIXEL 63,R,G,B,0
t$ = t$ + "FUENF "
end if
'6
if hhx=6 then
NEO.STRIP 27,31,R,G,B,1
NEO.STRIP 32,63,RX,GX,BX,0
t$ = t$ + "SECHS "
end if
'7
if hhx=7 then
NEO.STRIP 32,34,R,G,B,1
NEO.STRIP 40,42,R,G,B,1
NEO.STRIP 27,31,RX,GX,BX,0
t$ = t$ + "SIEBEN "
end if
'8
if hhx = 8 then
NEO.STRIP 56,59,R,G,B,1
NEO.STRIP 32,34,RX,GX,BX,1
NEO.STRIP 40,42,RX,GX,BX,0
t$ = t$ + "ACHT "
end if
'9
if hhx = 9 then
NEO.STRIP 52,55,R,G,B,1
NEO.STRIP 56,59,RX,GX,BX,0
t$ = t$ + "NEUN "
end if
'10
if hhx = 10 then
NEO.STRIP 48,51,R,G,B,1
NEO.STRIP 52,55,RX,GX,BX,0
t$ = t$ + "ZEHN "
end if
'11
if hhx = 11 then
NEO.STRIP 61,63,R,G,B,1
NEO.STRIP 48,51,RX,GX,BX,0
t$ = t$ + "ELF "
end if
'12
if hhx = 12 then
NEO.STRIP 35,39,R,G,B,1
NEO.STRIP 61,63,RX,GX,BX,0
t$ = t$ + "ZWOELF "
end if
tt$ = t$
return
' #######################################################################
STARTWERTE:
ZEIT$ = ""
IPADR$ = WORD$(IP$,1)
TYPUS$ = ""
TYPUS_alt$= "x"
Settings$ = ""
tt$ = "ES IST ..."
t$ = tt$
R = 0
G = 60
B = 50
R_alt = R + 1
G_alt = G
B_alt = B
RX = 5
GX = 5
BX = 5
RX_alt = RX
GX_alt = GX
BX_alt = BX
MODUS$ = "UHR"
mm = 1
mm_alt = 2
hh = 1
hh_alt = 2
ss = 1
mm_mod = 0
ON = 0
' !!!!!!!!!!!!!!!!!!!!!!!!!!
gosub EINSTELLUNGEN_LESEN
return
' #########################################################################
WebInterface:
cls
autorefresh 1000
'wlog time$
a$=""
a$ = a$ + "- - - W O R D C L O C K - - "
a$ = a$ + "################## "+ ver$
a$ = a$ + " #####################"
if IPADR$= "192.168.4.1" then
a$ = a$ + |Die Uhr ist gerade NICHT in einem WLAN angemeldet
|
a$ = a$ + |Evtl sind die Anmeldedaten falsch ...
|
a$ = a$ + |oder die Entfernung zu dem WLAN-AP ist zu gross.
|
a$ = a$ + |Bitte auf der CONFIG-PAGE |
a$ = a$ + |oben bei StationMode
die WLAN-SSID und das Kennwort
|
a$ = a$ + |eintragen bzw berichtigen.
|
a$ = a$ + |Weiter zur CONFIG-PAGE
|
else
a$ = a$ + textbox$(zeit$) + " - - - - " + TEXTBOX$(tt$)
a$ = a$ + "
Farbe der aktiven Zeichen:
"
a$ = a$ + SLIDER$(R,0,180)+ "R:" + TEXTBOX$(R) + "
"
a$ = a$ + SLIDER$(G,0,180)+ "G:" + TEXTBOX$(G) + "
"
a$ = a$ + SLIDER$(B,0,180)+ "B:" + TEXTBOX$(B) + "
"
a$ = a$ + "Farbe des Hintergrunds:
"
a$ = a$ + SLIDER$(RX,0,30) + "RX:" + TEXTBOX$(RX) + "
"
a$ = a$ + SLIDER$(GX,0,30) + "GX:" + TEXTBOX$(GX) + "
"
a$ = a$ + SLIDER$(BX,0,30) + "BX:" + TEXTBOX$(BX) + "
"
a$ = a$ +"
" + LISTBOX$( MODUS$, "UHR,COLOR_DEMO,DEMO","cssLB")+ " = Betriebs-Modus"
a$ = a$ +"
" + LISTBOX$( TYPUS$, "8x8,8x8+4,10x10","cssLB")+ " = Uhr-Hardware-Typ"
a$ = a$ + "
"
a$ = a$ + BUTTON$("EINSTELLUNGEN SICHERN", EINSTELLUNGEN_SCHREIBEN,"cssBT")
end if
a$ = a$ + "################## "+ ver$ + " #####################"
a$ = a$ + cssid$("cssLB"," width:150px;height:2em; font-size:1.0em; ")
a$ = a$ + cssid$("cssBT"," width:320px;height:2em; font-size:1.0em; border-radius:1.1em; padding:.5em")
html a$
a$=""
return
' ##############################################################
COLOR_DEMO:
mm= 0
for yy= 0 to LED_SPALTEN
for xx = 0 to LED_SPALTEN
rr = 80 - 10 * xx
gg = 10 * xx
bb = 10 * yy
NEO.PIXEL xx + LED_SPALTEN * yy,rr,gg,bb,1
NEO.PIXEL LED_end + 1 - (xx + LED_SPALTEN * yy),rr,gg,bb,0
next xx
next yy
for i = LED_end to 2 step -1
NEO.PIXEL i,rnd(100),rnd(100),rnd(100),1
NEO.PIXEL LED_end-i,rnd(100),rnd(100),rnd(100),0
next i
for yy= 0 to LED_SPALTEN
for xx = 0 to LED_SPALTEN
bb = 80 - 10 * xx
gg = 10 * xx
rr = 10 * yy
NEO.PIXEL xx + 8 * yy,rr,gg,bb,1
NEO.PIXEL LED_end + 1- (xx + 8 * yy),rr,gg,bb,0
next xx
next yy
for yy= LED_SPALTEN to 0 step -1
for xx = 0 to LED_SPALTEN
rr = 80 - 10 * xx
gg = 10 * xx
bb = 10 * yy
NEO.STRIP 0,LED_end,rr,gg,bb
pause 100
next xx
next yy
for yy= 0 to LED_SPALTEN
for xx = 0 to LED_SPALTEN
rr = 80 - 10 * xx
gg = 10 * xx
bb = 10 * yy
NEO.STRIP 0,LED_end,rr,gg,bb
'pause 100
next xx
next yy
NEO.STRIP 0,LED_end,RX,GX,BX
return
' ##############################################################
EINSTELLUNGEN_LESEN:
if file.exists("/Wordclock_settings") then SETTINGS$ = file.read$("/Wordclock_settings")
if SETTINGS$ <> "" then
R = val(file.read$("/Wordclock_R"))
G = val(file.read$("/Wordclock_G"))
B = val(file.read$("/Wordclock_B"))
RX = val(file.read$("/Wordclock_RX"))
GX = val(file.read$("/Wordclock_GX"))
BX = val(file.read$("/Wordclock_BX"))
TYPUS$= file.read$("/Wordclock_TYPUS")
endif
if TYPUS$ = "" then TYPUS$ = "8x8"
return
' ##############################################################
EINSTELLUNGEN_SCHREIBEN:
' schreibt die Einstellungen in einzelne Dateien im Flash
tt$ = "Werte schreiben"
xxx$ = "Wordclock-Daten"
file.save "/Wordclock_settings",xxx$
file.save "/Wordclock_TYPUS",TYPUS$
file.save "/Wordclock_R", str$(R)
file.save "/Wordclock_G", str$(G)
file.save "/Wordclock_B", str$(B)
file.save "/Wordclock_RX", str$(RX)
file.save "/Wordclock_GX", str$(GX)
file.save "/Wordclock_BX", str$(BX)
save_stat$ = "OK"
tt$ = "Werte wurden gesichert"
return
' ##############################################################
ShowIPADR:
'einzelne stellen der IP-Adresse als Stundenwert anzeigen
' 0 = 10
' Punkt = Anzeige komplett GRUEN
'
NEO.STRIP 0,LED_end + (m_LED *4),50,0,0
pause 900
NEO.STRIP 0,LED_end + (m_LED *4),0,0,0
IPADR$ = WORD$(IP$,1)
RR=R:GG=G:BB=B
ii=1
R=80:G=50:B=0
pp=0
for i = 1 to len(IPADR$)
tt$ =mid$(IPADR$,i,1)
if tt$ = "." then
pp =pp + 1
NEO.STRIP 0,LED_end,0,40,0
pause 400
if pp=3 then
R=0
G=100
B=0
endif
else
mm=0
hh=val(tt$)
if hh=0 then
hh= 10
end if
gosub showtime
end if
pause 1000
NEO.STRIP 0,LED_end,RX,GX,BX
'neo.cls()
next i
NEO.STRIP 0,LED_end,0,40,40
pause 2000
NEO.STRIP 0,LED_end,RX,GX,BX
R=RR:G=GG:B=BB
return
' ##############################################################
HW_TYPUS:
'Hardwaretyp der Uhr
if (TYPUS$ = "8x8") or (TYPUS$ = "8x8+4") or (TYPUS$ = "") then
'8*8-MATRIX-Uhr
'###############
LED_start = 0
LED_end = 63
LED_SPALTEN = 7 '= LED Anzahl pro Zeile minus 1!!!!!
LED_blink = 0
m_LED = 0 ' 0 zusaetzliche Minuten-LEDs vorhanden = 0
end if
if TYPUS$ = "8x8+4" then
m_LED = 1 ' 4 zusaetzliche Minuten-LEDs vorhanden = 1
end if
if TYPUS$ = "10x10" then
'10*10-MATRIX-Uhr
'###############
LED_start = 0
LED_end = 99
LED_SPALTEN = 9 '= LED Anzahl pro Zeile minus 1!!!!!
LED_blink = 54
m_LED = 0 ' 0 zusaetzliche Minuten-LEDs vorhanden = 0
end if
return
' ###############################################################
NEO_SETUP:
' !!!!!!!!!!! NEOPIXEL geht nur noch an GPIO02=D4 !!!!!!!!!!!!!!!
'Anzahl der LEDs incl Minuten-LED
neo.setup LED_end + (m_LED * 4)
'neo.setup 120
neo.strip LED_START, LED_END,0,0,0
return
' ##############################################################
Updates vom Autor