Bryan bought a new aquarium awhile back and some pretty little fish to go with it. The tank’s lighting system has a day and night mode in order to be a little more realistic for the fish’s natural environment, but you have to physically switch it between day and night. So as any hacker would do, he hooked a Raspberry Pi up to it and made it remote control!
The hardware control interface is a transistor and a relay connected to the gpio of the Raspberry Pi. The software interface has a manual mode and automatic mode. In automatic mode it pulls the sunrise and sunset data from the interwebs and alters the day/night modes accordingly.
Aside from the original article, Bryan decided to go a little deeper on the build with an overview in part 1 and hardware rundown in part 2 where he has the schematic and his pcb layout.
Source code is available on github. Info on getting node.js up is on the original article. Video demo after the break;