Sidereal clock

A project log for Raspberry Pi Zero W desk clock

An LED desk clock driven by NTP on a Pi Zero W

Nick SayerNick Sayer 05/12/2017 at 00:180 Comments

The Pi Zero W clock is ideal for displaying either Greenwich Mean Sidereal Time or Local Mean Sidereal Time - you just have to change the software around a bit.

I've done just that now. In the GitHub repo there's an SPI_Sidereal.c along side the rest. If you run it without any arguments, it displays GMST, but you can specify your longitude (+ for east, - for west) with -l and you'll get LMST. AM/PM is not available - the clock only shows 24 hour mode (I can't imagine anyone wanting otherwise), but the -B, -c, -d, -b and -t options are the same as before.

I actually recommend turning the tenth digit off on the sidereal clock. The clock displays sidereal time, but the updates are still synchronized against Unix time, and the two have differing second lengths, so it's not likely to be that accurate (never mind the fact that the time is calculated with floating point math).

There are other options you can use as well - you could use the clock as a countdown timer display, or perhaps an elapsed timer display... It's all fairly straightforward changes to the existing code.