Close

Conservation of vacumflourescence - A programmer's ramble

A project log for ISS Lamp - NTP clock - Artpiece

My "standalone" take on the ISS lamp lights up when the spacestation is overhead. It doubles as a NTP controlled clock.. with a VFD display.

robottoRobotto 08/08/2014 at 19:480 Comments

My latest update to the code is a displaybuffer, which is used to store a string before it is printed to the (vacumflourescent) display. 

The buffer lets me do all sorts of nifty things to my data before printing it out to the display, and also saves me a bunch of write cycles: before, when i wanted the clock to print i printed the hours, a colon, the minutes, a colon and then the seconds.. Now i put those things in the displaybuffer string and send it all at once.. nice and tidy.

It also let's me check the length of the data-to-be-printed, so i can determine where on the display the last caracter will be, and act accordingly: This is especially useful when doing countdowns (which I do a lot) since text blocks tend to get smaller and smaller as a spacestation pass approaches.

In short: the displaybuffer helps me makes sure I don't leave behind stray characters from previous prints, and helps me cut down on (the theoretically limited number of) write cycles to the VFD.

Discussions