temp prob/heater not working right
temp prob/heater not working right
I reloaded my code to update it with the new firm ware for the IOS APP. Now my heater is feeding off my room temp probe. I know I had this problem before but don't remember the fix. here is what's in my codes
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );
According to my portal my room temp is T1 Top off tank T2 and Display tank T3. Do I need to change to code? tried switching the probes but that didn't work, if im not mistaken the probes are set and even if you switch them it will still read the same no matter which port there plugged into correct?
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );
According to my portal my room temp is T1 Top off tank T2 and Display tank T3. Do I need to change to code? tried switching the probes but that didn't work, if im not mistaken the probes are set and even if you switch them it will still read the same no matter which port there plugged into correct?
Re: temp prob/heater not working right
It was a patch that lnevo pushed.
https://github.com/reefangel/Libraries/ ... 23436a6d74
I'm not sure the reason behind this change.
Let's wait for Lee to comment.
As a work around, change StandardHeater to StandardHeater3 in your code.
https://github.com/reefangel/Libraries/ ... 23436a6d74
I'm not sure the reason behind this change.
Let's wait for Lee to comment.
As a work around, change StandardHeater to StandardHeater3 in your code.
Roberto.
Re: temp prob/heater not working right
I think line 945 should have the TempProbe parameter not T1_PROBE. I guess I was thinking Standard would use T1 and Standard2 and 3 were T2 and T3. Anyway that change should let that use the default set in setup.
Re: temp prob/heater not working right
Well I've been playing with my code but not sure how to get the temp off the right probe. My code says reefangel.tempprobe = t3_probe
Reefangel.overheatprobe = t3_probe
I tried switching it to t1 for both but that didn't change anything. Is there something else in the coding I need to change?
Reefangel.overheatprobe = t3_probe
I tried switching it to t1 for both but that didn't change anything. Is there something else in the coding I need to change?
Re: temp prob/heater not working right
Try ReefAngel.StandardHeater3(Portx);
Change x to your heater port
Change x to your heater port
Re: temp prob/heater not working right
This is how I entered it into my code but it keeps giving me an error. the number 3 stays black while the letters turn orange
when I put it in there like this the letters and numbers all stay black and still gives an error
Code: Select all
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.StandardHeater 3(Port3);
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 790 );
Code: Select all
ReefAngel.StandardHeater3(Port3);
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 790 );
Re: temp prob/heater not working right
this is the original code
Code: Select all
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 790 );
Re: temp prob/heater not working right
Without the space it says portx was not declared in the scope. With the space before the 3 says expected; before numeric constant.
Re: temp prob/heater not working right
Ok, I see the problem. The rest of the functions do not have "Memory versions" other than the StandardHeater call.
So you're still suffering from the bug that I had originally pointed out, which means you need the patch I posted above. You should be able to set the TempProbe to T3_PROBE like you did and then use StandardHeater.
Look at line 1001, if it has this, you need the patch
StandardHeater(T1_PROBE, HeaterRelay, LowTemp, HighTemp);
It should be
StandardHeater(Params.Temp[Probe], HeaterRelay, LowTemp, HighTemp);
I think maybe a patch still needs to be submitted actually. I thought I did one but maybe Roberto hasn't added. I'll check later and confirm. I will also add the memory ones for StandardHeater2 and 3.
So you're still suffering from the bug that I had originally pointed out, which means you need the patch I posted above. You should be able to set the TempProbe to T3_PROBE like you did and then use StandardHeater.
Look at line 1001, if it has this, you need the patch
StandardHeater(T1_PROBE, HeaterRelay, LowTemp, HighTemp);
It should be
StandardHeater(Params.Temp[Probe], HeaterRelay, LowTemp, HighTemp);
I think maybe a patch still needs to be submitted actually. I thought I did one but maybe Roberto hasn't added. I'll check later and confirm. I will also add the memory ones for StandardHeater2 and 3.
Re: temp prob/heater not working right
im not sure where your talking about the only thing I can find in my code about temp or heat was the part I posted. here is my current code that im running.
Code: Select all
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>
////// Place global variable code below here
#define NUMBERS_8x16
void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 112);
ReefAngel.LCD.DrawText(COLOR_INDIGO, COLOR_WHITE,25,5, "Jeremy's Reef");
pingSerial();
DrawStatus (20,80);
DrawParams (5,40);
DrawParamsa (0,10);
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 790 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DosingPumpRepeat1( Port1);
ReefAngel.DosingPumpRepeat2( Port2);
ReefAngel.StandardATO( Port3,30 );
ReefAngel.StandardHeater( Port7);
ReefAngel.PWM.Channel0PWMSlope();
ReefAngel.PWM.Channel1PWMSlope(-5,5);
ReefAngel.PWM.Channel2PWMSlope(-10,10);
ReefAngel.PWM.Channel3PWMSlope(-15,15);
ReefAngel.PWM.Channel4PWMSlope(-20,20);
ReefAngel.PWM.Channel5PWMSlope(-25,25);
ReefAngel.DCPump.DaylightChannel = AntiSync;
ReefAngel.DCPump.ActinicChannel = Sync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
if (ReefAngel.DCPump.Mode==Custom)
{
ReefAngel.PWM.SetDaylight( ElseMode(70,30,true )); // ElseMode on sync mode, 70 +/- 30%
ReefAngel.PWM.SetActinic( ElseMode(70,30,false ));
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "jjdezek" );
ReefAngel.ShowInterface();
}
void DrawParamsa(int x, int y){
char buf[16];
ReefAngel.LCD.DrawText(DPColor,DefaultBGColor,x+70,y+10,"WP40L:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), DPColor, x+108, y+10,1);
ReefAngel.LCD.DrawText(APColor,DefaultBGColor,x+70,y+20,"WP40R:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(),APColor, x+108, y+20,1);
}
void DrawParams(int x, int y) {
char buf[16];
ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+5,y,"Temp:");
ReefAngel.LCD.DrawText(COLOR_BLACK,DefaultBGColor,x+80, y, "PH:");
// Temp and PH
y+=10;
ConvertNumToString(buf, ReefAngel.Params.Temp[T1_PROBE], 10);
ReefAngel.LCD.DrawLargeText(T1TempColor, DefaultBGColor, x+5, y, buf, Num8x16);
ConvertNumToString(buf, ReefAngel.Params.Temp[T2_PROBE], 10);
ReefAngel.LCD.DrawLargeText(T2TempColor, DefaultBGColor, x+5, y+12, buf, Num8x16);
ConvertNumToString(buf, ReefAngel.Params.Temp[T3_PROBE], 10);
ReefAngel.LCD.DrawLargeText(T3TempColor, DefaultBGColor, x+40, y+12, buf, Num8x16);
ConvertNumToString(buf, ReefAngel.Params.PH, 100);
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+80, y, buf, Num8x16);
y+=5;
ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,10,18, "SAL:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.Salinity,COLOR_DARKKHAKI,33,18, 10 );
}
void DrawStatus(int x, int y) {
int t=x;
ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,15,y,"High",Font8x16);
ReefAngel.LCD.DrawLargeText(COLOR_INDIGO,DefaultBGColor,85,y,"Low",Font8x16);
if (ReefAngel.HighATO.IsActive()) {
ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_GREEN);
} else {
ReefAngel.LCD.FillCircle(55,y+3,5,COLOR_RED);
}
if (ReefAngel.LowATO.IsActive()) {
ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_GREEN);
} else {
ReefAngel.LCD.FillCircle(70,y+3,5,COLOR_RED);
}
}
void DrawCustomGraph()
{
}
Re: temp prob/heater not working right
No it's a change in the libaries. You need to look for the file ReefAngel.cpp and search in there. Alternatively, you can download the fixed file from this link https://raw.githubusercontent.com/lnevo ... fAngel.cpp
and actually my fix earlier was wrong, the correct line should look just like this:
StandardHeater(TempProbe, HeaterRelay, LowTemp, HighTemp);
Let me know if this is clearer or not.
Roberto, here's the pull request I submitted in March for this issue.
https://github.com/reefangel/Libraries/pull/228
and actually my fix earlier was wrong, the correct line should look just like this:
StandardHeater(TempProbe, HeaterRelay, LowTemp, HighTemp);
Let me know if this is clearer or not.
Roberto, here's the pull request I submitted in March for this issue.
https://github.com/reefangel/Libraries/pull/228
Re: temp prob/heater not working right
ok I found that. What about the standardfan line? It also says the T1_Probe I don't have a fan but not sure if that will affect anything.
Re: temp prob/heater not working right
l.cpp error: 'TEMPPROBE' was not declared in this scope
that's the error code I get now when I try to verify my code. running original code with
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
when I change the TempProbe = T3_PROBE; to the StandardHeater3(port3) it still gives me the original errors I was getting and the StandardHeater3 stays back in color when I believe it should turn orange.
that's the error code I get now when I try to verify my code. running original code with
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
when I change the TempProbe = T3_PROBE; to the StandardHeater3(port3) it still gives me the original errors I was getting and the StandardHeater3 stays back in color when I believe it should turn orange.
Re: temp prob/heater not working right
The file is case sensitive. I would suggest downloading the full patched package and replacing it with your current libraries folder. https://github.com/lnevo/Libraries/archive/current.zip
Re: temp prob/heater not working right
I removed my old libraries and replaced it with that one and it still gave me the same error when trying to verify the code. is there something else I need to do?
Re: temp prob/heater not working right
The following features were automatically added:
Watchdog Timer
Version Menu
The following features were detected:
Dimming Signal
Salinity Expansion Module
Wifi Attachment
Custom Main Screen
Extra Font - Medium Size (8x8 pixels)
Extra Font - Numbers Only - Large Font (8x16 pixels)
Dimming Expansion Module
DC Pump Control (Jebao/Tunze)
Simple Menu
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp: In member function 'void ReefAngelClass::StandardHeater(byte, int, int)':
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp error: 'TempPROBE' was not declared in this scope
Watchdog Timer
Version Menu
The following features were detected:
Dimming Signal
Salinity Expansion Module
Wifi Attachment
Custom Main Screen
Extra Font - Medium Size (8x8 pixels)
Extra Font - Numbers Only - Large Font (8x16 pixels)
Dimming Expansion Module
DC Pump Control (Jebao/Tunze)
Simple Menu
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp: In member function 'void ReefAngelClass::StandardHeater(byte, int, int)':
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp error: 'TempPROBE' was not declared in this scope
Re: temp prob/heater not working right
So the only way I could reproduce that error is if the spelling is wrong on line 1001 in ReefAngel.cpp.
Your first error said TEMPPROBE the second error says TempPROBE. It shoudl be TempProbe.
It should compile fine, I've checked it. If you are using the StandardHeater3 function you will need to specify the heaters. If you are using the correctly patched code and you want to use Memory, then you should set the ReefAngel.TempProbe=T3_PROBE; and then use ReefAngel.StandardHeater(Port7);
I'm convinced you are updating the file improperly.
Please take a closer look at this file and on line 1001
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp error: 'TempPROBE' was not declared in this scope
Again, it should be
void ReefAngelClass::StandardHeater(byte HeaterRelay, int LowTemp, int HighTemp)
{
StandardHeater(TempProbe, HeaterRelay, LowTemp, HighTemp);
}
and if you use the StandardHeater3 function then you cannot use Memory at the moment. I will submit a patch for that as well.
Your first error said TEMPPROBE the second error says TempPROBE. It shoudl be TempProbe.
It should compile fine, I've checked it. If you are using the StandardHeater3 function you will need to specify the heaters. If you are using the correctly patched code and you want to use Memory, then you should set the ReefAngel.TempProbe=T3_PROBE; and then use ReefAngel.StandardHeater(Port7);
I'm convinced you are updating the file improperly.
Please take a closer look at this file and on line 1001
C:\Users\christina\Documents\Arduino\libraries\ReefAngel\ReefAngel.cpp error: 'TempPROBE' was not declared in this scope
Again, it should be
void ReefAngelClass::StandardHeater(byte HeaterRelay, int LowTemp, int HighTemp)
{
StandardHeater(TempProbe, HeaterRelay, LowTemp, HighTemp);
}
and if you use the StandardHeater3 function then you cannot use Memory at the moment. I will submit a patch for that as well.
Re: temp prob/heater not working right
Ok that was the problem. Not sure why it didn't work when I replaced the library. Maybe because I still had the original file on my desktop?
Re: temp prob/heater not working right
Ok I put the. ReefAngel.StandardHeater(Port7); in my code and it loaded fine. The issue is it's still reading off my room temp probe.
Re: temp prob/heater not working right
I switched the code back to the TempProbe = T3_Probe; and now it's reading correctly.
Re: temp prob/heater not working right
awesome!
I'll work on those patches.
I'll work on those patches.
Re: temp prob/heater not working right
Patches are in. StandardFan functions updated as well.