Quote Originally Posted by Mr. Ninja
Just looking at that code, you may want to look into using the avr chips in-built timers.

Da' reason:

using the delay() function actually stops the board from doing anything at all for however long you specify. Timers are literally just that: timers. You start a clock built into the avr chips, and call an interrupt when that hits a certain level.
You may want to look up arduino timers. The code all looked great.
Good point. The delay setup is just for controlling the pumps. Once we add complexity, I will change accordingly later. Any thoughts on pros-cons of just using millis() (for those who don't know, it records the time since the device was turned on). I know it resets after a few days, but if I'm just concerned with dt (time differences), would it matter?

I really like the idea of using a Pi, but how well do the two interface? Would you write the code for an arduino sketch or just have it connected to the Pi and write the code through that?