Instructables user Aleator777 has a tutorial up on how to build this stunning lunar clock using your Raspeberry Pi. Via raspberrypi.org.
In this Instructable we will be building a dynamic lunar lamp with the Raspberry Pi. With your very own lunar clock you’ll always know the current phase of the moon, no matter the weather!
Budding astronomer? Recently bitten by a werewolf? Whatever your lunar-phase-knowing needs, the Lunar Phase Clock has you covered! If you’re interested in getting started on the build, move on over to the next step. Here we’ll talk about the astronomy behind the project.
So what are the phases of the Moon?
Just as the Earth orbits the Sun, so too the Moon orbits the Earth. The Moon is tidally locked to the Earth, which means that because the Moon completes its own rotation in the same time it take to orbit around the Earth, we always see the same side of the Moon. While we may be stuck to the same view of the Moon, the relationship between the Earth and Sun as the Moon completes its orbit is constantly changing. This means that it will be illuminated to varying degrees (or not at all!) and will take on a distinct shape. These distinct shapes are what we refer to as the lunar phases. The Moon completes a cycle around the Earth every 29.53 days; this is referred to as a synodic month.