Page 1 of 1

Nixie Clock ScreenSaver

Posted: Thu Feb 10, 2011 3:35 pm
by jph_wacheski
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;

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;


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.

Posted: Thu Feb 10, 2011 4:06 pm
by VilleK
Never heard of Nixie tubes before but I like this screen saver! Thanks to the flickering effect they don't look like static bitmaps. Also the clock script is neat.

Posted: Thu Feb 10, 2011 4:12 pm
by jph_wacheski
yeah,. that is done with the BitmapLoad and a couple of BitmapBlur componets, that way, I only needed to have the actual number font file in the project once and modify it at run time to generate the blur bitmap.