Page 1 of 1

Setting up Dosing pumps

Posted: Sat Mar 10, 2012 6:51 pm
by najluni15
Hi all,

I am just getting my reef angel setup and have everything going correctly, but now it is time to setup my dosing pumps. When I add the dosing pumps to my code it says the file is too big. Looking around on the forum it looks like i can cut some fluff out of my code, but am not sure what i can remove. Please see my file and let me know if you have any ideas. I just have my ato, lights, pumps, skimmer, and heater on the file. Not sure if im doing it right. Also, how do you program the dosing pumps to go on at an exact time in seconds and off at a given time? It is the reef angel doser.

// Autogenerated file by RAGen (v1.2.1.158), (03/10/2012 15:20)
// RA_031012_1520.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File:
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 8
#define SIMPLE_MENU
*/


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <ReefAngel.h>


void setup()
{
ReefAngel.Init(); //Initialize controller

// Ports that are always on
ReefAngel.Relay.On(Port3);
}
void loop()
{
// Specific functions
ReefAngel.StandardATO(Port1,15);
ReefAngel.StandardLights(Port2,21,0,11,0);
ReefAngel.StandardLights(Port4,12,0,21,0);
ReefAngel.StandardLights(Port5,8,0,22,0);
ReefAngel.StandardHeater(Port6,788,792);
ReefAngel.DosingPump1(Port7);
ReefAngel.DosingPump2(Port8);
ReefAngel.ShowInterface();
}

Thanks so much!!!

Re: Setting up Dosing pumps

Posted: Sat Mar 10, 2012 6:55 pm
by rimai
Open RAGen
Move to Features tab
Uncheck Date/Time Setup
Uncheck Expansion Relays
Click Save

Re: Setting up Dosing pumps

Posted: Sat Mar 10, 2012 7:18 pm
by najluni15
Thank you for the help. How would I structure the code to make the dosing pump 1 come on at 3 am for 45 seconds and 5 am for 45 seconds, then the second pump come on at 10am for 95 seconds?

Thanks

Re: Setting up Dosing pumps

Posted: Sat Mar 10, 2012 9:59 pm
by rimai
Try this:

Code: Select all

  if (hour()<4)
    ReefAngel.DosingPump(Port7, 1, 3, 0, 45);
  else
    ReefAngel.DosingPump(Port7, 1, 5, 0, 45);

  ReefAngel.DosingPump(Port8, 2, 10, 0, 95);

Re: Setting up Dosing pumps

Posted: Sun Mar 11, 2012 10:57 am
by najluni15
Thanks....So what does the (1) and the (2) signify in the codes? And could i copy the code you made exactly to make dosing pump on port 7 come on at 3 and then at 5 for 45 seconds, then port 8 come on at 10 for 95 seconds?

Sorry for the kinda repetetive questions but I tried to figure it out and did it wrong

Re: Setting up Dosing pumps

Posted: Sun Mar 11, 2012 12:57 pm
by binder
najluni15 wrote:Thanks....So what does the (1) and the (2) signify in the codes? And could i copy the code you made exactly to make dosing pump on port 7 come on at 3 and then at 5 for 45 seconds, then port 8 come on at 10 for 95 seconds?

Sorry for the kinda repetetive questions but I tried to figure it out and did it wrong
The 1 and 2 are references to some built-in timers in the libraries. There are only 2 timers (maybe 3) that are not used by other functionality that are available for your use. One timer can be used at a time (ie, one timer per dosing pump).

Yes, the code that was provided should do exactly what you are talking about. You would just need to use that code instead of the DosingPump(Port7) and DosingPump(Port8) lines in your original file.