Here’s my Aquarium Controller. It’s a huge sketch, I’ve tried posting it in code tags but I’d have to break it up into like 10 posts because of the 9000 character limit per post on this forum.
It generates an HTML webpage to display information as well as input and control.
logging data to SD card and Sparkfun Data server every 10min
Arduino Mega 2560 R3
W5100 Ethernet & SD
DS18B20 Temp sensor
4 channel relay board (only using 2 atm)
PH v1.1 Probe
LED ramping via 1-10v meanwell drivers and simple transistor cct.
auto fish feeder with manual override via relay board
LED fan control via relay board controlled by DS18B20 sensor
NTP time server sync (for time of day only, I set dates manually at the moment)
Everything works, although I’m sure there’s more efficient ways to get things done, it’s quite stable and functions well. I’ve hacked this code together from many different sources.
I hope this helps someone! lots of useful code attached
Here’s a link to quickly view the code Github
Aqua.ino (35.8 KB)
libraries.zip (160 KB)