Incidentally you know your system will only work in the Northern hemisphere. If you use it in the southern hemisphere you have to hang it up side down otherwise the phase will be in the wrong direction.
Good catch. I'll stick another combobox on the C# form that asks what hemisphere you're in. When the arduino reads the value over serial I'll store it in EEPROM for safe keeping...
It should be a simple fix. You'll notice that I use a single byte and a bitmask to determine the status of the LEDs, so maybe something like:
currentPhase = getPhase(fullYear, month, day);
if((SouthernHemi) && (currentPhase != 0 && currentPhase != 63))
currentPhase = ~currentPhase;
// phase 0 is NEW moon, and phase 63 (00111111b) is FULL moon.
updateMoon(currentPhase);
The two leftmost bits are unused, so their value will not effect the outcome...
Thanks for your input!
Tim