Heater port on / off based on temp

Do you have a question on how to do something.
Ask in here.

Posts: 111
Joined: Thu Jun 28, 2012 1:46 pm
PostPosted: Sun Nov 27, 2016 10:46 am
Hi - quick question I hope.

Right now I have my RA set up to turn off my port when a certain temp is reached.

Is there sample code / examples that turns on / off the port in a range? Hopefully I'm asking it correctly but what I'd like to be able to do is limit the plug / power to the heater only when needed. As opposed to it always being on now. It may toggle the port on/off more so maybe not a good idea?

Or maybe a second question is how do you all usually manage heaters? I have not typically run them in the past but for some reason my 40 breeder here was dipping down to 73 degrees :(

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Nov 27, 2016 11:40 am
We have a heater function that turns on when lower than x temp and turns off when higher than y temp.
Is it what you are looking for?
Use the wizard to generate a code and you will see.
Roberto.

Posts: 111
Joined: Thu Jun 28, 2012 1:46 pm
PostPosted: Sun Nov 27, 2016 1:18 pm
Hi Rimai - that would work perfect. I didn't think to fire that up to check but that would do the trick.

Thank you.

Posts: 149
Joined: Mon Oct 15, 2012 7:21 pm
Location: Albany, GA
PostPosted: Sun Aug 20, 2017 4:02 pm
Try this code....has worked for me greatly.

Code: Select all
void SeasonalTemps ()
 {
  static int heatArray[][2] = { {792,796},// default in case of error in month=0 (June)
                    {770,774},//January (winter)
                    {774,778},//February (winter)
                    {775,779},//March (early spring)
                    {779,783},//April (spring)
                    {785,789},//May (spring)
                    {792,796},//June (early summer)
                    {799,803},//July (summer)
                    {806,810},//August (summer)
                    {796,800},//September (early fall)
                    {787,791},//October (fall)
                    {780,784},//November (fall)
                    {775,779} };//December (early winter)
                   
               
  ReefAngel.StandardHeater( Port2,heatArray[month()][0],heatArray[month()][1]);
 }//end seasonalTemps


And in your loop add this:
Code: Select all
SeasonalTemps();
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun Aug 20, 2017 6:22 pm
89delta wrote:Try this code....has worked for me greatly.

Code: Select all
void SeasonalTemps ()
 {
  static int heatArray[][2] = { {792,796},// default in case of error in month=0 (June)
                    {770,774},//January (winter)
                    {774,778},//February (winter)
                    {775,779},//March (early spring)
                    {779,783},//April (spring)
                    {785,789},//May (spring)
                    {792,796},//June (early summer)
                    {799,803},//July (summer)
                    {806,810},//August (summer)
                    {796,800},//September (early fall)
                    {787,791},//October (fall)
                    {780,784},//November (fall)
                    {775,779} };//December (early winter)
                   
               
  ReefAngel.StandardHeater( Port2,heatArray[month()][0],heatArray[month()][1]);
 }//end seasonalTemps


And in your loop add this:
Code: Select all
SeasonalTemps();

this is an interesting way to handle different temperatures and fluctuations throughout the year. nice example!


Sent from my iPad using Tapatalk

Posts: 149
Joined: Mon Oct 15, 2012 7:21 pm
Location: Albany, GA
PostPosted: Sat Aug 26, 2017 9:41 pm
Ty Curt....have used this temp code for a full year along with co-ordinates for Heart Reef in AU when I had my 29BC set up.
User avatar
Posts: 2748
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun Aug 27, 2017 5:14 am
89delta wrote:Ty Curt....have used this temp code for a full year along with co-ordinates for Heart Reef in AU when I had my 29BC set up.
BC? biocube?

Sent from my XT1585 using Tapatalk

Posts: 149
Joined: Mon Oct 15, 2012 7:21 pm
Location: Albany, GA
PostPosted: Sun Aug 27, 2017 10:55 am
Yes, biocube

Sent from my SM-N920T using Tapatalk

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 3 guests

cron