I modified the photo from here; http://en.wikipedia.org/wiki/Nixie_tube
Latter I may do the whole thing modeled in 3d ? as even this ver. makes a nice clock that look cool from accross the room.
Anyway the clock code I devised is;
Code: Select all
int zH=getSystemTime()/3600;
int zM=getSystemTime()/60-zH*60;
int zS=getSystemTime()-(zH*3600+zM*60);
if (zH>12) zH-=12; //12 or 24 hours
string h=intToStr(zH); if (length(h)<2) h="0"+h;
string m=intToStr(zM); if (length(m)<2) m="0"+m;
string s=intToStr(zS); if (length(s)<2) m="0"+m;
t.text=h+m+s;
Opps! I had a typo,. or a cutNpast-o in there;
Code: Select all
string s=intToStr(zS); if (length(s)<2) m="0"+m;
//from above should have been
string s=intToStr(zS); if (length(s)<2) s="0"+s;
This made the digits jump around some,. it is fixed in the attachment.