Here is a picture of two panel meters for hours and minutes. When I get another panel meter I'll add seconds, it is pretty cool to see them tick by.
The panel meters are 1mA max. I found some 3.2K ohm resistors which are just slightly higher than needed. I will add a trim pot for each to adjust. Also, fighting some breadboard resistance that changes with wire movement.
I used a program to generate the simple panel meters. You can adjust the size for your particular panel meter. http://www.tonnesoftware.com/meterbasicdownload2.html Took a few prints to get it right. The meters come apart pretty easily. I'll redo them with better paper eventually, this was good enough for now.
The basic code is pretty simple. I have a few things to add as noted in the header. Running on V3.0 Alpha 42
'******************************************************
'* Analog Panel Meter Clock *
'* by Russ McIntire, 8/27/16 *
'* D0 = Hours *
'* D1 = Minutes *
'* D2 = Seconds *
'* *
'* To do: HTML setup screen to select DST, TZ, SSID *
'* Daily NTP timesetup call *
'******************************************************
timesetup(-4,1) 'Need to figure out what is wrong with DST
delay 5000
udpbegin 5001
hour = 0
min = 0
sec = 0
M = " "
udptimer = 0
hourpwm = 0
minpwm = 0
secpwm = 0
timer 1000, [updatetime]
wait
end
[updatetime]
'Get time values from NTP server
hour = val(time("hour"))
min = val(time("min"))
sec = val(time("sec"))
'For UDP message show AM/PM
if hour > 12 then
hour = hour - 12
M = "PM"
else
if hour = 0 then
hour = 12
endif
M = "AM"
endif
'Panel PWM calculation
hourpwm = 93.1 * (hour - 1) 'divide 1024/11
minpwm = 17.36 * min 'divide 1024/59
secpwm = 17.36 * sec 'divide 1024/59
'Panel output
io(pwo,d0,hourpwm)
io(pwo,d1,minpwm)
io(pwo,d2,secpwm)
'Send UDP broadcast message out for current time
udptimer = udptimer + 1
if udptimer > 30 then
ct = str(hour)&":"&time("min:sec")&" "&M
udpwrite "192.168.10.255", 5001, ct
udptimer = 0
endif
wait
It will eventually go into a wood cabinet and be constructed on a little perf board or perhaps I'll make a PCB. Hoping I can get DST working right someday. Can't seem to get it to actually do anything, had to make a work around for the aquarium timer.