3

(coco) #1
LENS

since the beginning of 1970. The code also
uses the TimeLib library to calculate the time
to the future event being monitored.
And that’s about it for the central task of
displaying current time and time to the end of
the Trump administration.


TWITTERING
In addition to establishing a dedicated
Twitter account, setting up the Twitter
feature requires including an authorisation
token in the code, which can be obtained
from hsmag.cc/HrvMId. While it would be
easy to have the clock tweet at a fixed time
each day, that would be very boring – the
hours, minutes, and seconds to go would
always be the same. So the code uses the
randomSeed function to pick a particular
second on each day to fire off the tweet. A bit
of care is needed to make sure the tweet is
grammatically correct whether the time units
are singular, plural, or zero.


SERVER AND WEBSITE
The clock has an ‘external’ site created on
and hosted by Squarespace. As part of the
whole project, I wanted some decent-looking
internet presence and this was a quick way to
realise that. Of more interest to readers here,
however, the clock also has its own internally
hosted site. This provides a convenient place
to include an instruction manual, a place to
configure the future event name to be sent to
the LCD, and a log of the motion detection. It
also has a free widget that counts down the
time to the end of the Trump administration
from timeanddate.com. On one level, it’s a
bit depressing that this information is so easily
available after the not inconsiderable effort
invested in building the clock. On the other
hand, the widget is not a Nixie clock, and it
does provide an independent time check.
Unlike the Squarespace site, there’s nothing
fancy about the ‘internal’ site, though I did
use some Bootstrap templates to make it
look halfway decent. The internal site (which
can be made available over the internet using
a free hostname and dynamic DNS address
from no.ip.com) is only available when
selected by the user.
Quite a bit of code is used to manage
the display and rotary encoder. This is
fairly straightforward – take a look at the


previous code link if you want to dive into
the nitty-gritty.
With so many switches and other controls,
some labelling was required. I’ve never figured
out how to do this even halfway satisfactorily.
For this project I ordered a couple of metal
dog tags customised with the words I needed.
Cut up and appropriately ‘distressed’, these
went at least some ways to complementing
the overall design.
While this build took quite a bit of time and
effort, each part of it is fairly straightforward,
and you could start with a simpler display. It
can also be reused many times – there will
always be some future joyous event to which
you’ll want to count down.

Below
Sure, LEDs could display the data
just as accurately, but nothing
appeals to us on a primal level
quite like Nixies
Free download pdf