Post about your Basic project here

Moderator: Mmiscool

User avatar
By PeterN
#69811 Inspired by the expensive WordcCocks named Qlocktwo by Biegert&Funk I made some (german) wordclocks. They are controlled by a wemos D1 Mini or NodeMCU with ESP-Basic and "some" lines of ESP-Basic-code.
I used neopixel-LED-strips to make a 10*10- , 8*8- and 8*8+4-Matrix. The letters/words of the clock are printed transparent on a black background with a laserprinter on translucent overhead foil.
Words are illuminated from the backside and projected onto a canvas frame or white paper.
.
See some examples:
.
Image
.
Image
.

Image
.
To control the clock I created a Web-Interface:
This gives control over colors of words and background color.
Settings are stored permanently.

Image
.
.
Sorry for my spaghetti-ESP-basic-code dotted with german comments and german names for variables and subroutines etc . ;)
The code helps to integrate a clock into a new WIFI by starting an access point and presenting a different homepage, if the esp8266 can not login to a WIFI.
At startup the clock shows its IP-address as a series of full-hour time specifications - so it is very easy to find it on the WIFI with PC, tablet or smartphone.

The program can cope with three different LED-matrix-versions of the clock: 10*10, 8*8, and 8*8+4.
In addition to the web-interface, the clock is responding to messages. So you can call up some demos etc.
.
.
Code: Select all'WordClock  10x10 und 8*8
'Peter.Neufeld@gmx.com
'09.2017
'10x10 oder 8x8 NeoPixel an !!!!GPIO15 = D08!!!!!
' 8x8+4 = mit 8x8 mit 4 zusaetzlichen Minuten LEDs 
'
' Zeigt beim Start die IP-Adresse als  Stunden an
' Mit msgbranch fuer Modi "demo" und "colordemo-demo" etc
' TYPUS=[10x10|8x8|8x8+4]  in EEPROM gespeichert

ver="V6.7"
IPADR = ip()
time.setup(2,1)

gosub [STARTWERTE]
gosub [HW_TYPUS]
gosub [Website]
gosub [showIPADR]

zeit = time("hour min sec") 
' Falls keine NTP-Zeit geholt werden konnte:
' DEMO-Modus und rote Anzeige
if zeit = "00 00 00" then
   MODUS = "DEMO"
   R = 100
   G = 0
   B = 0
else
   MODUS = "UHR"
end if
' !!!!!!!!!!!!!
msgbranch [MSG]
' !!!!!!!!!!!!!
timer 1900, [SetNEO]
wait
' ##############################################################

[SetNEO]

zeit = time("hour min sec") 
if MODUS ="UHR" then COLOR = "NEIN"
if MODUS = "COLOR_DEMO" then
   timer 0
   gosub [color_demo]
   delay 3000
   timer 1900, [SetNEO]
   MODUS = "UHR"
   R_alt = R_alt + 1
endif

if MODUS = "UHR" or MODUS = "UHR_MIT_COLOR_WECHSEL" then
   mm = val(time("min"))
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(time("sec"))
if MODUS = "UHR" or MODUS = "UHR_MIT_COLOR_WECHSEL"  then
   hh = val(time("hour"))
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.stripcolor(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.stripcolor(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 mm_mod > 4 then
      do
      mm_mod = mm_mod -5
loop while ( mm_mod > 4 and TYPUS = "8x8+4")
   end if       
   if mm_mod > 0 then
      neo.stripcolor(LED_end +1,LED_end + mm_mod,R,G,B)
      neo.stripcolor(LED_end + mm_mod + 1,LED_end + 5,RX,GX,BX)
   else
      neo.stripcolor(LED_end +1,LED_end + 5,RX,GX,BX)
   end if
   gosub [showtime]
else
' [SMILY]
if LED_blink > 0 then
   if ON = 1 then
      ON = 0
neo.stripcolor(LED_blink,LED_blink + 1,R/2,G/2,B/2)
   else
      ON = 1
      neo.stripcolor(LED_blink,LED_blink + 1,R,G,B)
   end if
end if
end if
wait
' #######################################################################
[MSG]
antwort = msgget("modus")
msgreturn "WordClock hoert auf /msg?modus=[demo|color_demo|uhr|exit|run|reboot]; empfangen wurde: "& antwort
if antwort = "demo" then
   MODUS = "DEMO"
end if
if antwort = "color_demo" or antwort = "COLOR_DEMO" then
   MODUS = "COLOR_DEMO"
end if
if antwort = "exit" then
   goto [TestExit]
end if
if antwort = "uhr" then
   MODUS = "UHR"
end if
if antwort = "run" or antwort = "reboot" then
   msgreturn "WordClock antwortet: OK REBOOT"
   reboot
end if

wait

' #######################################################################
[zeitanzeigen]
gosub [showtime]
wait
' #######################################################################
[showtime]
if TYPUS = "10x10" then
   gosub [showtime_10x10]
else
   gosub [showtime_8x8]
end if
return

[showtime_10x10]

'[ES]
neo.stripcolor(0,2,R,G,B)
t = ""

'[IST]
neo.stripcolor(3,5,R,G,B)

'[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.stripcolor(6,9,R,G,B)
t = t & "FUENF "
else
   neo.stripcolor(6,9,RX,GX,BX)
end if

'[ZEHN]
if (mm >9 and mm<15) or (mm >49 and mm <55) then
   neo.stripcolor(10,13,R,G,B)
t = t & "ZEHN "
else
   neo.stripcolor(10,13,RX,GX,BX)
end if

'[ZWANZIG]
if (mm >19 and mm<25) or (mm >39 and mm <45) then
   neo.stripcolor(14,19,R,G,B)
t = t & "ZWANZIG "
else
   neo.stripcolor(14,19,RX,GX,BX)
end if

'[NACH1] nach-halb
if (mm > 34 and mm<40) then
   neo.stripcolor(20,23,R,G,B)
t = t & "NACH "
else
   neo.stripcolor(20,23,RX,GX,BX)
end if

'[VIERTEL]
if (mm >14 and mm<20) or (mm >44 and mm <50) then
   neo.stripcolor(24,29,R,G,B)
t = t & "VIERTEL "
else
   neo.stripcolor(24,29,RX,GX,BX)
end if

'[VOR]
if (mm >24 and mm <30)or (mm > 39 and mm<60)  then
   neo.stripcolor(30,32,R,G,B)
t = t & "VOR "
else
   neo.stripcolor(30,32,RX,GX,BX)
end if

'[NACH2]
if (mm >4 and mm<25) then
   neo.stripcolor(33,35,R,G,B)
t = t & "NACH "
else
   neo.stripcolor(33,35,RX,GX,BX)
end if

'[HALB]
if mm>24 and mm<40 then
   neo.stripcolor(36,39,R,G,B)
t = t & "HALB "
else
   neo.stripcolor(36,39,RX,GX,BX)
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.stripcolor(40,45,R,G,B)
t = t & "EINS "
else
   neo.stripcolor(40,45,RX,GX,BX)
end if

'2
if hhx=2 then
   neo.stripcolor(46,49,R,G,B)
t = t & "ZWEI "
else
   neo.stripcolor(46,49,RX,GX,BX)
end if

'3
if hhx=3 then
   neo.stripcolor(50,53,R,G,B)
t = t & "DREI "
else
   neo.stripcolor(50,53,RX,GX,BX)
end if

'4
if hhx=4 then
   neo.stripcolor(56,59,R,G,B)
t = t & "VIER "
else
   neo.stripcolor(56,59,RX,GX,BX)
end if

'5
if hhx=5 then
   neo.stripcolor(60,64,R,G,B)
t = t & "FUENF "
else
   neo.stripcolor(60,64,RX,GX,BX)
end if

'6
if hhx=6 then
   neo.stripcolor(65,69,R,G,B)
t = t & "SECHS "
else
   neo.stripcolor(65,69,RX,GX,BX)
end if

'7
if hhx=7 then
   neo.stripcolor(70,75,R,G,B)
t = t & "SIEBEN "
else
   neo.stripcolor(70,75,RX,GX,BX)
end if

'8
if hhx = 8 then
   neo.stripcolor(76,79,R,G,B)
t = t & "ACHT "
else
   neo.stripcolor(76,79,RX,GX,BX)
end if

'9
if hhx = 9 then
   neo.stripcolor(80,83,R,G,B)
t = t & "NEUN "
else
   neo.stripcolor(80,83,RX,GX,BX)
end if

'10
if hhx = 10 then
   neo.stripcolor(84,86,R,G,B)
t = t & "ZEHN "
else
   neo.stripcolor(84,86,RX,GX,BX)
end if

'11
if hhx = 11 then
   neo.stripcolor(87,89,R,G,B)
t = t & "ELF "
else
   neo.stripcolor(87,89,RX,GX,BX)
end if

'12
if hhx = 12 then
   neo.stripcolor(90,95,R,G,B)
t = t & "ZWOELF "
else
   neo.stripcolor(90,95,RX,GX,BX)
end if

'[UHR]
if mm <5 then
   neo.stripcolor(96,99,R,G,B)
t = t & "UHR "
else
   neo.stripcolor(96,99,RX,GX,BX)
end if
tt = t
return

' #######################################################################
[showtime_8x8]

'[bis 4 nach]
if (mm<5)  then
t = "genau "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[FUNF nach]
if (mm >4 and mm<10)  then
   t = "FUENF nach "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,R,G,B) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[ZEHN nach]
if (mm >9 and mm<15)  then
   t = "ZEHN nach "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,R,G,B) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[FUENFZEHN nach]
if (mm >14 and mm<20)  then
   t = "FUENFZEHN nach "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,R,G,B) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[ZEHN vor HALB]
if (mm >19 and mm<25)  then
   t = "ZEHN vor HALB "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,R,G,B) 'VOR
   neo.stripcolor(16,19,R,G,B) 'HALB
   goto [STUNDEN]
end if

'[FUENF vor HALB]
if (mm >24 and mm<30)  then
   t = "FUENF vor HALB "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,R,G,B) 'VOR
   neo.stripcolor(16,19,R,G,B) 'HALB
   goto [STUNDEN]
end if

'[HALB]
if (mm >29 and mm<35)  then
t = "HALB "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,R,G,B) 'HALB
   goto [STUNDEN]
end if

'[FUENF nach HALB]
if (mm >34 and mm<40)  then
   t = "FUENF nach HALB "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,R,G,B) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,R,G,B) 'HALB
   goto [STUNDEN]
end if

'[ZEHN nach HALB]
if (mm >39 and mm<45)  then
   t = "ZEHN nach HALB "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,R,G,B) 'NACH
   neo.stripcolor( 8,10,RX,GX,BX) 'VOR
   neo.stripcolor(16,19,R,G,B) 'HALB
   goto [STUNDEN]
end if

'[FUENFZEHN vor]
if (mm >44 and mm<50)  then
   t = "FUENFZEHN vor "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,R,G,B) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[ZEHN vor ]
if (mm >49 and mm<55)  then
   t = "ZEHN vor "
   neo.stripcolor( 0, 3,RX,GX,BX) 'FUENF
   neo.stripcolor( 4, 7,R,G,B) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,R,G,B) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) 'HALB
   goto [STUNDEN]
end if

'[FUENF vor ]
if (mm >54 and mm<60)  then
t = "FUENF vor "
   neo.stripcolor( 0, 3,R,G,B) 'FUENF
   neo.stripcolor( 4, 7,RX,GX,BX) 'ZEHN
   neo.stripcolor(12,15,RX,GX,BX) 'NACH
   neo.stripcolor( 8,10,R,G,B) 'VOR
   neo.stripcolor(16,19,RX,GX,BX) '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.stripcolor(20,63,RX,GX,BX)

'1
if hhx=1 then
   neo.stripcolor(24,27,R,G,B)
   neo.stripcolor(28,63,RX,GX,BX)
   t = t & "EINS "
end if

'2
if hhx=2 then
   neo.stripcolor(24,27,RX,GX,BX)
   neo.stripcolor(35,36,R,G,B)
   neo.stripcolor(45,46,R,G,B)
   t = t & "ZWEI "
end if

'3
if hhx=3 then
   neo.stripcolor(35,36,RX,GX,BX)
   neo.stripcolor(43,46,R,G,B)
   t = t & "DREI "
end if
'4
if hhx=4 then
   neo.stripcolor(20,23,R,G,B)
   neo.stripcolor(43,46,RX,GX,BX)
   t = t & "VIER "
end if

'5
if hhx=5 then
   neo.stripcolor(20,23,RX,GX,BX)
   neo(39,R,G,B,1)
   neo(47,R,G,B,1)
   neo(55,R,G,B,1)
   neo(63,R,G,B,0)
   t = t & "FUENF "
end if

'6
if hhx=6 then
   neo.stripcolor(27,31,R,G,B)
   neo.stripcolor(32,63,RX,GX,BX)
   t = t & "SECHS "
end if

'7
if hhx=7 then
   neo.stripcolor(32,34,R,G,B)
   neo.stripcolor(40,42,R,G,B)
   neo.stripcolor(27,31,RX,GX,BX)
   t = t & "SIEBEN "
end if

'8
if hhx = 8 then
   neo.stripcolor(56,59,R,G,B)
   neo.stripcolor(32,34,RX,GX,BX)
   neo.stripcolor(40,42,RX,GX,BX)
   t = t & "ACHT "
end if

'9
if hhx = 9 then
   neo.stripcolor(52,55,R,G,B)
   neo.stripcolor(56,59,RX,GX,BX)
   t = t & "NEUN "
end if

'10
if hhx = 10 then
   neo.stripcolor(48,51,R,G,B)
   neo.stripcolor(52,55,RX,GX,BX)
   t = t & "ZEHN "
end if
'11
if hhx = 11 then
   neo.stripcolor(61,63,R,G,B)
   neo.stripcolor(48,51,RX,GX,BX)
   t = t & "ELF "
end if
'12
if hhx = 12 then
   neo.stripcolor(35,39,R,G,B)
   neo.stripcolor(61,63,RX,GX,BX)
   t = t & "ZWOELF "
end if
tt = t
return
' #######################################################################
[STARTWERTE]

IPADR = ip()

ssid       = "dummy"
kennwort    = "dummy"
ssid       = read("WIFIname")
kennwort    = read("WIFIpass")

H_sleep = 0
T_sleep = 8
T_sleep_s = 0

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
dimm = 0
' !!!!!!!!!!!!!!!!!!!!!!!!!!
gosub [einstellungen_lesen]

' !!!!!!!!!!! MIT NEOPIXEL an GPIO15 !!!!!!!!!!!!!!!
'neo.setup(2)
neo.setup(15)
neo.cls()
return

' #########################################################################

[Website]
cls
html "<h1>"
wprint "- W o r d C l o c k " & ver & " -"
html "</h1><h5>"
wprint "#####################################"

html "</h5>"

if IPADR="192.168.4.1" then
'+++++++++++++++++++++
   html |Aktuell verwendete WLAN-Anmeldedaten: <br>WLAN-Name:|
   ''''
   textbox ssid
   '''
   html |<br>Passwort:|
   '''
   'passwordbox kennwort
   textbox kennwort
   '''
   html |<br>|
   '+++++++++++++++++++++
else
   textbox zeit
   textbox tt
   html "<br>"
wprint "<br>Farbe der aktiven Zeichen<br>"
   slider R,0,180
   ' ###
   html "R:"
   textbox R
   html "<br>"

   slider G,0,180
   html "G:"
   textbox G
   html "<br>"

   slider B,0,180
   html "B:"
   textbox B
   html "<br>"
'##########
   wprint "<br>Farbe des Hintergrunds<br>"
   wprint
   slider RX,0,30
   ' ###
   html "RX:"
   textbox RX
   html "<br>"

   slider GX,0,30
   html "GX:"
   textbox GX
   html "<br>"

   slider BX,0,30
   html "BX:"
   textbox BX
   html "<br>"

'##########
   html "<br>Betriebs-Modus:"
   dropdown MODUS, "UHR,COLOR_DEMO,DEMO"
   html "<br>Uhr-Typus:"
   dropdown TYPUS, "8x8,8x8+4,10x10"

   html "<br><br>"
   'button "SLEEP", [SLEEP]
end if

button "EINSTELLUNGEN SICHERN", [einstellungen_schreiben]

html "<br>"
button "E x i t", [TestExit]
html "<br>Kurzaufrufe:<br>"

html |<a href="./run">-NEUSTART-</a><br>|
html |<a href="./msg?modus=color_demo">-COLOR_DEMO-</a><br>|
html |<a href="./msg?modus=demo">-DEMO-schnelle Uhrzeit</a><br>|
html |<a href="./msg?modus=exit">-PRGM-STOPP-</a><br>|
html |<a href="./msg?modus=reboot">-REBOOT-</a><br>|

wprint "<br>WordClock hoert auch auf<br>"
wprint "http://" & IPADR &  "/msg?modus=[demo|color_demo|uhr|exit|run|reboot] <br>"


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(xx + LED_SPALTEN * yy,rr,gg,bb,1)
neo(LED_end + 1 - (xx + LED_SPALTEN * yy),rr,gg,bb,0)
   next xx
next yy
'delay 1000
for i = LED_end to 2 step -1
   neo(i,rnd(100),rnd(100),rnd(100),1)
   neo(LED_end-i,rnd(100),rnd(100),rnd(100),0)
next i
'delay 4000
for yy= 0 to LED_SPALTEN
   for xx = 0 to LED_SPALTEN
      bb = 80 - 10 * xx
      gg = 10 * xx
      rr = 10 * yy
      neo(xx + 8 * yy,rr,gg,bb,1)
      neo(LED_end + 1- (xx + 8 * yy),rr,gg,bb,0)
   next xx
next yy
'delay 3000

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.stripcolor(0,LED_end,rr,gg,bb)
      delay 100
   next xx
next yy
'delay 1000
for yy= 0 to LED_SPALTEN
   for xx = 0 to LED_SPALTEN
      rr = 80 - 10 * xx
      gg = 10 * xx
      bb = 10 * yy
      neo.stripcolor(0,LED_end,rr,gg,bb)
      'delay 100
   next xx
next yy
'delay 1000
neo.stripcolor(0,LED_end,RX,GX,BX)
return

' ##############################################################
[einstellungen_lesen]
settings = Read("Wordclock_settings")
if settings <> "" then
   R = read.val("Wordclock_R")
    G = read.val("Wordclock_G")
    B = read.val("Wordclock_B")
   RX = read.val("Wordclock_RX")
    GX = read.val("Wordclock_GX")
    BX = read.val("Wordclock_BX")
TYPUS      = read("Wordclock_TYPUS")
endif
ssid       = read("WIFIname")
kennwort    = read("WIFIpass")
if TYPUS = "" then TYPUS ="8x8"
return

' ##############################################################

[einstellungen_schreiben]
' schreibt die Einstellungen in einzelne Dateien im Flash
tt = "Werte schreiben"
xxx = "Wordclock-Daten"
write("Wordclock_settings",xxx)
write("Wordclock_TYPUS",TYPUS)
write("Wordclock_R", str(R))
write("Wordclock_G", str(G))
write("Wordclock_B", str(B))
write("Wordclock_RX", str(RX))
write("Wordclock_GX", str(GX))
write("Wordclock_BX", str(BX))
write("WIFIname",ssid)
write("WIFIpass",kennwort)
save_stat = "OK"
tt = "Werte wurden geschrieben"
wait

' ##############################################################
[showIPADR]
'einzelne stelen der IP-Adresse als Stundenwert anzeigen
' 0 = 10
' Punkt = Anzeige komplett GRUEN
neo.cls()
neo.stripcolor(0,LED_end,50,0,0)
delay 900
neo.cls()
IPADR = ip()
RR=R
GG=G
BB=B
ii=1
R=100
G=0
B=0
pp=0
for i = 1 to len(IPADR)   
   tt=mid(IPADR,i,1)
   if tt="." then
   pp =pp + 1
      neo.stripcolor(0,LED_end,0,40,0)
      delay 300
      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
   delay 600
   neo.stripcolor(0,LED_end,RX,GX,BX)
   'neo.cls()
next i
neo.stripcolor(0,LED_end,0,40,40)
delay 2000
neo.stripcolor(0,LED_end,RX,GX,BX)
R=RR
G=GG
B=BB
return
' ##############################################################

[WIFI]
'gleichzeitig WIFI-Client und Accesspoint
wifiapsta
tt   = read("APname")
' if tt = "" then
tt = "Wordclock" & id()
' end if
wifi.ap(tt, "bingo123")
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

[TestExit]
timer 0
wprint "Nun ist Schluss ...."
neo.stripcolor(0,LED_end,0,0,0)

for i = LED_end to 2 step -1
neo(i,rnd(100),rnd(100),rnd(100),0)
'delay 20
next i
delay 4000
neo.stripcolor(0,LED_end,0,0,0)
mm=0
for hh= 3 to 1 step -1
   neo.stripcolor(0,LED_end,0,0,0)
   gosub [showtime]
   delay 600
next hh

neo.stripcolor(0,LED_end,0,0,0)
hh=11
mm=55
gosub [showtime]
end
    

.

The (not jet streamlined;-) code requires the ESP-Basic to be very fast.
For example this enables the web-interface to control the clock with the color-sliders in realtime.
So I had to use the pure and small 1M-ESP-Basic-software-image without any extensions.

If you like the project, you can see more fotos and videos of the clocks :---FOTOS---

Some videos on Vimeo:
MIDI-white
MIDI_black_holo
MINI_8*8


.
Remarks and comments welcome! :!:
Best regards

Peter