Here is the thread that has my INO
http://forum.reefangel.com/viewtopic.php?f=11&t=2328
RunDosingPumps(); // Dose by volume or time
CalibrateDPumps(); // Calibrate Dosing pumps
LogDosingPumps(); // Keep track of dosing
adjustAlk(); // Adjust Alkalinity to desired PPM (thanks AlanM)
LockPorts(); // Clear overrides for critical ports
It shouldn't be that hard, but those are the functions you'll need to copy into your INO and call them from inside your loop() function. Then it would just be a matter of compiling and resolving the dependencies on whatever variables I have in global that are needed. There shouldn't be too many, just the memory locations where the information is stored.
For the calibration, you turn on the VO_Calibrate port and it will be in calibration mode. This is another port I protect with the LockPorts function so for me that would have to be off first (or on, I forget the default..) Anyway, once you're in calibration mode, it will log the time your dosing pumps are on. Whatever time you want. You can turn them off, on, off, on whatever. The cumulative time ALL your dosing pumps are on will be recorded in memory once you turn off the calibration port. It then uses the value you set in memory for the Mem_I_DPXVolume to figure out the flow rate.
So now that you know how the process works. You can calibrate it one of 2 ways. Either fill up a graduated cylinder or other up to a known volume. You would set this in the volume location. Or you can run the pump for 10 minutes and then record in the volume variable the amount that was dosed. Either way should result in the same flow.
After this is setup and you want to set the volume or duration for your dosing pump. You would set this up in the portal using the time settings. It will automatically convert that to volume and record it in the Mem_I_DPXVol variable. If you change the DPVol variable, it will update the default time variable, so you can always see your result.
The log function does two things actually. First it records when the pumps are on and totals the seconds converting it again to volume and storing that in a Custom variable that you can see on the portal. There's also a function there to manage vinegar dosign and incremental increases each week up to a max week. So you can setup your vinegar schedule at whatever point you want for as many weeks as you like.