Page 1 of 1

Tank Temp Probe

Posted: Sat Aug 20, 2011 6:47 pm
by binder
Is anybody interested in the ability to change what temp probe is monitoring their tank? Right now you have to use the 1st temp sensor to monitor your tank. This probe is what the StandardFan and StandardHeater functions use.

Just curious if anybody would be interested. Oh, and for those who are curious, there would be approximately 14-18 bytes added to code size (exact amount is unknown but bare minimum would be 14 bytes).

curt

Re: Tank Temp Probe

Posted: Tue Aug 23, 2011 11:34 am
by mbertalha
binder wrote:Is anybody interested in the ability to change what temp probe is monitoring their tank? Right now you have to use the 1st temp sensor to monitor your tank. This probe is what the StandardFan and StandardHeater functions use.

Just curious if anybody would be interested. Oh, and for those who are curious, there would be approximately 14-18 bytes added to code size (exact amount is unknown but bare minimum would be 14 bytes).

curt
Curt,
would be interesting you have more than one temperature probe operating in the same tank, but with different capabilities to control "StandardFan2 and StandardHeater2." Thus it could for example control the temperature of the LED lamp and if necessary an Unlock extra fan or even turn off the LED lighting.

tanks.

Marcelo

Re: Tank Temp Probe

Posted: Tue Sep 20, 2011 4:09 pm
by binder
mbertalha wrote: Curt,
would be interesting you have more than one temperature probe operating in the same tank, but with different capabilities to control "StandardFan2 and StandardHeater2." Thus it could for example control the temperature of the LED lamp and if necessary an Unlock extra fan or even turn off the LED lighting.
You can do this but you can't use the default functions. You would have to code in that functionality in your PDE file manually. If you wanted to turn on a port/relay based on temp 2, you could do this:

Code: Select all

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);
}
This is just an example. It can be improved upon, but that's the general idea for it.

curt

Re: Tank Temp Probe

Posted: Sun Feb 12, 2012 2:01 pm
by rossbryant1956
mbertalha wrote:
binder wrote:Is anybody interested in the ability to change what temp probe is monitoring their tank? Right now you have to use the 1st temp sensor to monitor your tank. This probe is what the StandardFan and StandardHeater functions use.

Just curious if anybody would be interested. Oh, and for those who are curious, there would be approximately 14-18 bytes added to code size (exact amount is unknown but bare minimum would be 14 bytes).

curt
Curt, did you ever demonstrate how we might do this? This is happening to me right now. Thx

Re: Tank Temp Probe

Posted: Sun Feb 12, 2012 2:19 pm
by binder
I have it added to the libraries for the next release (which should be very soon). Then there will be a very simple way to change the probe that monitors the tank.

Re: Tank Temp Probe

Posted: Sun Feb 12, 2012 2:27 pm
by rossbryant1956
Just wanted to thank Roberto and Binder for helping me write the code to perform the step detailed above. Attached is the snippet I now use and it works great!.

Code: Select all

// Bunch of stuff deleted so you can just see the relevant code
// T1_Probe now monitors my salt water reservoir mixing station

void setup()
{
   
    ReefAngel.TempProbe = T2_PROBE;  // Set the 1st plug (which acts like the 2nd plug) 
    ReefAngel.OverheatProbe = T2_PROBE;  // to monitor the overheat and temperatures
}

void loop()
{
    // Specific functions
    if (ReefAngel.Params.Temp[T2_PROBE] <= 780 && ReefAngel.Params.Temp[T2_PROBE] > 0) ReefAngel.Relay.On(Port7); 
    if (ReefAngel.Params.Temp[T2_PROBE] >= 791) ReefAngel.Relay.Off(Port7);
    if (ReefAngel.Params.Temp[T1_PROBE] <= 780 && ReefAngel.Params.Temp[T1_PROBE] > 0) ReefAngel.Relay.On(Port1);
    if (ReefAngel.Params.Temp[T1_PROBE] >= 791) ReefAngel.Relay.Off(Port1);
    ReefAngel.ShowInterface();
}