## Nixie Clock ScreenSaver

Post screenshots, binaries and projectfiles of the projects you have made with ZGE that you want to share!

Moderator: Moderators

jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Contact:

### Nixie Clock ScreenSaver

I recently got an Ardurino and have been looking at some of the cool projects ppl have posted,. when surfing around the net I happened on a site about Nixie tubes,. and thought a clock would be cool. The price of all the gear is a bit much, so I just built a virtual one in ZGE!

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;``````
Cheers

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.
Attachments
NixieClock_03.zip
266kb ziped .scr (fixed)
Last edited by jph_wacheski on Fri Feb 18, 2011 3:48 pm, edited 1 time in total.
iterationGAMES.com

VilleK