This is the code for my raspberry pi controled aquarium. For this I use 2 mosfets to controll the fish feeder and the strip of lights. The strip of lights is connected on the only HW PWM pin on RPi.
Implemented functions:
-light controlled based on sun's raising and fallig.
-automatic fish feeder.