Temperature probe customizations (This is not currently in RAGen, but will be added in the future).
CODE: SELECT ALL
Allowed for easy customization of Tank and Overheat temp probes
Overheat temp can be customized
* use ReefAngel.OverheatProbe = PROBE
Heater & Fan/Chiller temp can be customized
* use ReefAngel.TempProbe = PROBE
PROBE can be T1_PROBE, T2_PROBE or T3_PROBE
Place those lines in setup() and after ReefAngel.Init();
The probe plugged into my T1_PROBE has a higher factory-set inscribed value than the probe plugged into T2_PROBE. I need the T1_PROBE to monitor my heater, my overheat value, etc. The probe plugged into the switch T2_PROBE needs to monitor the water in my water makeup barrel and I will probably do something like the idea in http://forum.reefangel.com/viewtopic.php?f=7&t=229 to do:
void loop()
{
// rest of functions go here
// ...
// turn on port 6 when temp falls below 76.0 and turn off when temp gets above 80.0
if (ReefAngel.Params.Temp2 <= 760 && ReefAngel.Params.Temp2 > 0) ReefAngel.Relay.On(Port6);
if (ReefAngel.Params.Temp2 >= 800) ReefAngel.Relay.Off(Port6);
}
So, in summary I need the probe sitting in the first position to do what the probe in second position is doing and the probe in second position to do something else entirely. Thx in advance for your help and assistance.
BTW I love the new release!!
Ross
Roscoe's Reefs - Starting Over Again:
Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
Just so I'm clear, the 1st probe plug reads as T2 temp and the 2nd probe plug reads T1 temp, right?
That's how I'm basing this reply.
1st, we will handle the monitoring the heater and overheat. Then at the end of the code we will handle the other monitoring.
Since the 1st probe plug acts as the 2nd probe in the code, we will do this:
void setup()
{
ReefAngel.Init();
// Set the 1st plug (which acts like the 2nd plug) to monitor
// the overheat and temperatures
ReefAngel.TempProbe = T2_PROBE;
ReefAngel.OverheatProbe = T2_PROBE;
// Rest of relay on's here
}
void loop()
{
// rest of functions go here
// ...
// turn on port 6 when temp falls below 76.0 and turn off when temp gets above 80.0
if (ReefAngel.Params.Temp[T2_PROBE] <= 760 && ReefAngel.Params.Temp[T2_PROBE] > 0)
ReefAngel.Relay.On(Port6);
if (ReefAngel.Params.Temp[T2_PROBE] >= 800) ReefAngel.Relay.Off(Port6);
// handle the 2nd plug (which acts like the 1st plug) here
// ReefAngel.Params.Temp[T1_PROBE] is the variable for the "first" probe
// which is the lowest factory inscribed probe
// so do something with it here
//if (ReefAngel.Params.Temp[T1_PROBE] >= 850) ReefAngel.Relay.Off(Port6);
// showinterface goes here
}
All we are doing is just using the 2nd probe value to indicate the probe plugged into the 1st plug because of the factory inscribed ordering.
This is how I implemented the code you helped write...Please take a look. Thx in advance.
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port8Bit; // Turn off Port 5, Port 6, Port8 when feeding mode is activated
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit; // Turn off Port4, Port5, Port6, Port7 and Port8 when water change mode is activated
ReefAngel.TempProbe = T2_PROBE; // Set the 1st plug (which acts like the 2nd plug)
ReefAngel.OverheatProbe = T2_PROBE; // to monitor the overheat and temperatures
ReefAngel.Relay.On(Port8); // Turn on Pump
}
void loop()
{
// Specific functions
ReefAngel.StandardLights(Port2,8,00,23,00); // Regular Lights on at 8:00am and off at 11:00pm
ReefAngel.StandardLights(Port3,00,30,03,30); // Moon Lights on at 12:30pm and off at 11:30pm
ReefAngel.Wavemaker1(Port5);
ReefAngel.Wavemaker2(Port6);
ReefAngel.StandardHeater(Port7);
ReefAngel.Portal("rossbryant1956");
ReefAngel.WavemakerRandom(Port5,15,60); // Turn Port5 on/off random cycles that lasts from 15 to 60 secs
ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5)); // Turn Port6 on/off on opposite cycle as Port 5
// Port 5 and 6 are synchronized.
// They work in opposing motion of each other at random times.
// turn on port 7 when temp falls below 76.0 and turn off when temp gets above 80.0
if (ReefAngel.Params.Temp[T2_PROBE] <= 760 && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp[T2_PROBE] >= 800) ReefAngel.Relay.Off(Port7);
if (ReefAngel.Params.Temp[T1_PROBE] >= 810) ReefAngel.Relay.Off(Port1);
ReefAngel.ShowInterface();
}
Roscoe's Reefs - Starting Over Again:
Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port8Bit; // Turn off Port 5, Port 6, Port8 when feeding mode is activated
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit; // Turn off Port4, Port5, Port6, Port7 and Port8 when water change mode is activated
ReefAngel.TempProbe = T2_PROBE; // Set the 1st plug (which acts like the 2nd plug)
ReefAngel.OverheatProbe = T2_PROBE; // to monitor the overheat and temperatures
ReefAngel.Relay.On(Port8); // Turn on Pump
}
void loop()
{
// Specific functions
ReefAngel.StandardLights(Port2,8,00,23,00); // Regular Lights on at 8:00am and off at 11:00pm
ReefAngel.StandardLights(Port3,00,30,03,30); // Moon Lights on at 12:30pm and off at 11:30pm
ReefAngel.Wavemaker1(Port5);
ReefAngel.Wavemaker2(Port6);
ReefAngel.StandardHeater(Port7);
ReefAngel.WavemakerRandom(Port5,15,60); // Turn Port5 on/off random cycles that lasts from 15 to 60 secs
ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5)); // Turn Port6 on/off on opposite cycle as Port 5
// Port 5 and 6 are synchronized.
// They work in opposing motion of each other at random times.
// turn on port 7 when temp falls below 76.0 and turn off when temp gets above 80.0
if (ReefAngel.Params.Temp[T2_PROBE] <= 760 && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(Port7);
if (ReefAngel.Params.Temp[T2_PROBE] >= 800) ReefAngel.Relay.Off(Port7);
if (ReefAngel.Params.Temp[T1_PROBE] >= 810) ReefAngel.Relay.Off(Port1);
ReefAngel.Portal("rossbryant1956");
ReefAngel.ShowInterface();
}