------------- --- The webpage for the Webserver function sendWebPage(conn,answertype) if (ssid == nil) then ssid="Not set" end if (sntpserverhostname == nil) then sntpserverhostname="ptbtime1.ptb.de" end if (timezoneoffset == nil) then timezoneoffset=1 end -- Set the default color, if nothing is set if (color == nil) then color=string.char(0,0,250) end if (color1 == nil) then color1=color end if (color2 == nil) then color2=color end if (color3 == nil) then color3=color end if (color4 == nil) then color4=color end local hexColor = "#" .. string.format("%02x",string.byte(color,1)) .. string.format("%02x",string.byte(color,2)) .. string.format("%02x",string.byte(color,3)) local hexColor1 = "#" .. string.format("%02x",string.byte(color1,1)) .. string.format("%02x",string.byte(color1,2)) .. string.format("%02x",string.byte(color1,3)) local hexColor2 = "#" .. string.format("%02x",string.byte(color2,1)) .. string.format("%02x",string.byte(color2,2)) .. string.format("%02x",string.byte(color2,3)) local hexColor3 = "#" .. string.format("%02x",string.byte(color3,1)) .. string.format("%02x",string.byte(color3,2)) .. string.format("%02x",string.byte(color3,3)) local hexColor4 = "#" .. string.format("%02x",string.byte(color4,1)) .. string.format("%02x",string.byte(color4,2)) .. string.format("%02x",string.byte(color4,3)) local buf="HTTP/1.1 200 OK\nServer: NodeMCU\nContent-Type: text/html\n\n" if (node.heap() < 8000) then buf = buf .. "

Busy, please come later again

" endOfPage=true else -- hack for the second part of the page buf=nil if (answertype==10) then buf = "1. Minute Color" buf = buf .."2. Minute Color" buf = buf .."3. Minute Color" buf = buf .."4. Minute Color" buf = buf .."Three quaterDreiviertel Joa/nei" --buf = buf .."ColorModeIf checked, words are dark, rest is colored" buf = buf .. "
" buf = buf .. "
" buf = buf .."" conn:send(buf) buf=nil collectgarbage() -- Code will only be added once the page is loaded endOfPage=true return end buf = buf .. "" buf = buf .. "WordClock Setup Page" buf = buf .. "\n" buf = buf .. "

Welcome to the WordClock

" buf = buf .."
" buf = buf .."" buf = buf .."" buf = buf .."" buf = buf .."" buf = buf .."" buf = buf .."" if answertype==2 then buf = buf .. "

New configuration saved" elseif answertype==3 then buf = buf .. "

ERROR" elseif answertype==4 then buf = buf .. "

Not all parameters set" end buf = buf .. "\n" end conn:send(buf) buf=nil collectgarbage() end

WIFI-SSID
WIFI-Password
SNTP Serverntp server to sync the time
Offset to UTC timeDefine the offset to UTC time in hours. E.g +1
Color