Page 1 of 1
Everything is reading 0.
Posted: Sat Aug 24, 2013 5:38 pm
by Sacohen
I had something similar happen last week.
I checked everything I did last week and still no good.
All 3 temp probes read 0, pH reads 0, Salinity reads 0, and Water Level reads 0.
The relays are working and tuning on and off, when programmed, but I'm getting no parameter readings.
This started when I noticed my water level was not changing at all. It stayed at 36% no mater what.
At this point all my parameters looked fine. I had 3 temps, pH and salinity of 34.9.
I could turn off the pumps and let water back siphon into the sump and it was still 36%.
I tried re-calibrating and it still read 36% even when I had the tube still in the tank to 100%.
I reloaded the Water Level test code and it now read 0.
I reloaded my code and at this point all my parameters showed 0.
I did a hard reboot (pulled the power to the RA).
No change.
Double checked that everything is plugged in properly and it is, but I have no parameter readings.
Please Help
Re: Everything is reading 0.
Posted: Sat Aug 24, 2013 6:08 pm
by rimai
Does pH read zero with no probes and no other modules?
Re: Everything is reading 0.
Posted: Sat Aug 24, 2013 6:55 pm
by Sacohen
No the pH is fine with no probes or other modules plugged in.
Once I saw that I started plugging things back in 1 by one.
First the Temp and then rebooted.
Everything was 0 again.
Unplugged the temp probes. and plugged in the expansion hub, which had the Salinity, DC power module and Water Level.
Rebooted.
Everything was fine with everything plugged in except the temp probes.
Tried each temp probe 1 by one with a reboot in between and got 0 anytime any temp probe was plugged in.
Right now all 3 temp probes are unplugged and everything is reading fine.
What do you think Roberto?
Re: Everything is reading 0.
Posted: Sat Aug 24, 2013 7:17 pm
by rimai
Could be the probe that gone bad, but all 3 at the same time doesn't seem like it.
The only other thing I can think of is the controller itself.
Any water damage?
Re: Everything is reading 0.
Posted: Sat Aug 24, 2013 7:19 pm
by Sacohen
No. It all seems dry.
I'll try them again, 1 at a time, but it will have to be tomorrow.
I got to get up early in the morning and pick up my parents from a returning cruise.
Thanks.
I'll let you know what happens.
Re: Everything is reading 0.
Posted: Sun Aug 25, 2013 7:07 am
by Sacohen
I tried all three probes on each Temp port with a hard reboot in between and still no Temp reading.
All the other reading have been fine since I unplugged the Temp probes.
I'm guessing it's the head unit since none of the probes are working on any of the ports.
Re: Everything is reading 0.
Posted: Sun Aug 25, 2013 8:40 am
by rimai
PM for RMA
Re: Everything is reading 0.
Posted: Wed Aug 28, 2013 6:02 pm
by Sacohen
Roberto;
I swapped out the head unit with the new one i got today and everything is working fine.
Reading all 3 Temps, pH, Salinity and water level.
The only thing that does not seem right are my dimming ports on the Relay.
The Daylight and Actinic, which are controlling my 2 Jebao pumps they have been at 20% since I re-loaded the code.
After testing somethings I noticed that it stays at whatever the last setting in the code was.
For example if I choose water change from the menu or the andriod app, it is set to 0%, when I exit the water change mode it stays at 0%. If I choose Feeding Mode it goes to 20% (as it should) and stays at 205 when I either exit feeding mode or it reaches the end of the feeding.
I looked at my code and noticed that there was a set of lines duplicated.
Code: Select all
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
So I removed the repeated code and re-loaded it.
After doing that everything is reading 0 again.
After several minutes the pH, Salinity, and Water Level start showing again, but the temps are still out.
Also my portal is showing everything possible,even though I don't have it.
All 8 relays, a PWM Expansion Module, the RF Expansion Module, the Aqua Illumination, the I/O Expansion Water Level (that I do have, but it is reading 0% when my phone reads 40% and the custom fields.
Re: Everything is reading 0.
Posted: Wed Aug 28, 2013 9:27 pm
by rimai
Your pumps are staying at the last mode because there is nothing else for them to do.
If they are not in feeding and not in wc mode, you have nothing to set them to anything else.
For the readings, you got something else in there causing it to fail.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 3:35 am
by Sacohen
The pumps when not in feed or water change mode are supposed to be running cosmith's Else mode
See attached code....
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>
// Define Relay Ports by Name
#define Actinic_Lights 1
#define Day_Lights 2
#define Unused 3
#define Pumps 4
#define Sump_Fan 5
#define DeNit_Pump 6
#define DeNit_Doser 7
#define Unused 8
#define ATO_Pump Box1_Port1
#define Moon_Lights Box1_Port2
#define Unused Box1_Port3
#define Unused Box1_Port4
#define Unused Box1_Port5
#define Unused Box1_Port6
#define Unused Box1_Port7
#define Unused Box1_Port8
////// Place global variable code below here
unsigned long ATOUpdate=0;
////// 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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit;
// Use T2 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 825 );
//Set Standard Menu
ReefAngel.AddStandardMenu();
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=20;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Actinic_Lights,12,0,22,0 );
ReefAngel.StandardLights( Day_Lights,13,0,21,0 );
ReefAngel.Relay.Set( Moon_Lights, !ReefAngel.Relay.Status( Actinic_Lights ) );
ReefAngel.StandardLights( Sump_Fan,13,0,21,0 );
ReefAngel.Relay.Set(DeNit_Doser,(now()-3600)%21600<1200); // Runs for 1200s every 21600 seconds
ReefAngel.Relay.Set(DeNit_Pump,((now()-3600)-1200)%21600<1200); // Runs for 1200s every 21600 seconds with 1200s offset
ReefAngel.WaterLevelATO(ATO_Pump,720,32,32); // Enable ATO the ATO
if (ReefAngel.Relay.Status(DeNit_Pump)) // Check to see if DeNit Pump is on and update time is empty
{
ATOUpdate = now(); // If so, set the update time to now
}
if (now() - ATOUpdate < 120) // If it hasnt been 120 seconds turn off the port
{
ReefAngel.WaterLevelATO(ATO_Pump,720,0,1);
}
//Disable ATO if Salinity is below 33.5
if (ReefAngel.Params.Salinity<335) ReefAngel.Relay.Off(ATO_Pump);
if (ReefAngel.DCPump.Mode==Custom)
{
ReefAngel.PWM.SetActinic( ElseMode(40,20,true )); // ElseMode on sync mode, 40 +/- 20%
ReefAngel.PWM.SetDaylight( ElseMode(80,20,false )); // ElseMode on Anti-sync mode, 80 +/- 20%
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Sacohen","Seth0310" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Water Level
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
ConvertNumToString(text, ReefAngel.Params.Salinity, 10);
strcat(text," ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,39,75,"Salinity:");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,99,75,text);
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
pingSerial();
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox(12, 104, TempRelay);
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
{
// Static's only initialize the first time they are called
static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
static int Delay = random( 500, 3000); // Set the initial delay
static int NewSpeed = MidPoint; // Set the initial speed
static int AntiSpeed = MidPoint; // Set the initial anti sync speed
if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
{
Delay=random(500,5000); // If so, come up with a new delay
int ChangeUp = random(Offset); // Amount to go up or down
if (random(100)<50) // 50/50 chance of speed going up or going down
{
NewSpeed = MidPoint - ChangeUp;
AntiSpeed = MidPoint + ChangeUp;
}
else
{
NewSpeed = MidPoint + ChangeUp;
AntiSpeed = MidPoint - ChangeUp;
}
LastChange=millis(); // Reset the time of the last change
}
if (WaveSync)
{
return NewSpeed;
}
else
{
return AntiSpeed;
}
}
Why is the Portal showing possible add on and module all of a sudden?
I did not send out the old head unit, I want to put is back in tonight and see if I at least go back to the way things were before I switched them out yesterday.
Thanks;
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:02 am
by rimai
Your mode only works when you set the internal memory to custom.
Did you do that?
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:23 am
by Sacohen
I'm not sure.
I used the same code that was on my old RA+ Head Unit.
The Internal Memory on the Portal is set to Custom with a speed and duration of 255.
I removed the line that said
Code: Select all
if (ReefAngel.DCPump.Mode==Custom)
So this code is now pointing to the Else Mode code that is at the bottom of the coding...
Code: Select all
{
ReefAngel.PWM.SetActinic( ElseMode(40,20,true )); // ElseMode on sync mode, 40 +/- 20%
ReefAngel.PWM.SetDaylight( ElseMode(80,20,false )); // ElseMode on Anti-sync mode, 80 +/- 20%
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
It is supposed to be at 30% until 12pm so I'll see what happens in about 40 min.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:33 am
by rimai
The latest data from your controller shows dcd, dcm and dcs are all 255.
http://forum.reefangel.com/status/param ... id=sacohen
I think it is because you are missing this:
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:40 am
by Sacohen
I think I figured out what was wrong with the pumps at least.
I'll see what happens at 12pm when the Else mode is supposed to kick in.
The temp problem is still a mystery and is the fact that whenever I re-boot (either pull the power or re-boot after code upload I lose all my readings, but Salinity, pH and Water level eventually come back.
This time they haven't.
If you are saying the temp is due to something in my code, I'm going to try setting up a INO thru the wizard and see what happens.
With clean code from the wizard the Temp probes should work fine.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:44 am
by rimai
No, the something else is not code related.
I think it could be your probes that are causing this, since it did the same thing on the previous board.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 8:53 am
by Sacohen
All 3 probes at once? Strange.
The pumps are working correctly now.
The pH, Water level and Salinity have not come back yet, like they have in the past.
Any idea why the portal is showing everything in the world now?

Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 9:27 am
by rimai
I just told you 3 posts above....
You must setup DCD,DCM and DCS or the portal will crap out.
It's set to 255 for all 3 right now and there is not such thing as mode 255, so the javascript fails to set the mode and it causes the portal to show everything.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 9:43 am
by Sacohen
I'm not understanding this, sorry.
When you said
I thought you were talking about the pump speeds.
I'm not using the DCPump command or the internal memory for my pumps.
As I said...
Sacohen wrote:
I removed the line that said
Code: Select all
if (ReefAngel.DCPump.Mode==Custom)
So this code is now pointing to the Else Mode code that is at the bottom of the coding...
Code: Select all
{
ReefAngel.PWM.SetActinic( ElseMode(40,20,true )); // ElseMode on sync mode, 40 +/- 20%
ReefAngel.PWM.SetDaylight( ElseMode(80,20,false )); // ElseMode on Anti-sync mode, 80 +/- 20%
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
Is the dcd, dcm and dcs referring to the portal issue, the temp issue or the pump speed issue?
If it is referring to the portal or temp issue where and how do I change them and what should they be?
I don't recall ever doing that before with my other board.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 9:46 am
by rimai
If you are not going to use the DC pump class, you must remove the other references too or the feature will still be enabled.
When you compile, you should not see DC Pump feature in the list of features found.
Code: Select all
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=20;
ReefAngel.DCPump.WaterChangeSpeed=0;
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:05 am
by Sacohen
I currently have had the code that you show above commented out.
The only place DCPump still appeared in my code was the DCPump.h.
I have removed every reference to DCPump and uploaded my code again.
Is this supposed to fix the portal issue of everything showing up?
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:15 am
by rimai
The auto-selection of features does not discriminate between comments or not.
You should remove it from the code or the feature will be enabled anyway.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:19 am
by Sacohen
See post above.
Sacohen wrote:I have removed every reference to DCPump and uploaded my code again.
Is this supposed to fix the portal issue of everything showing up?
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:21 am
by rimai
You need to remove and not comment it out.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:32 am
by Sacohen
It is removed (not commented out).
Here is my code as of 12:30pm today.
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 <ReefAngel.h>
// Define Relay Ports by Name
#define Actinic_Lights 1
#define Day_Lights 2
#define Unused 3
#define Pumps 4
#define Sump_Fan 5
#define DeNit_Pump 6
#define DeNit_Doser 7
#define Unused 8
#define ATO_Pump Box1_Port1
#define Moon_Lights Box1_Port2
#define Unused Box1_Port3
#define Unused Box1_Port4
#define Unused Box1_Port5
#define Unused Box1_Port6
#define Unused Box1_Port7
#define Unused Box1_Port8
////// Place global variable code below here
unsigned long ATOUpdate=0;
////// 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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit;
ReefAngel.WaterChangePortsE[0] = Port1Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit;
// Use T2 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 825 );
//Set Standard Menu
ReefAngel.AddStandardMenu();
// Ports that are always on
ReefAngel.Relay.On( Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Actinic_Lights,12,0,22,0 );
ReefAngel.StandardLights( Day_Lights,13,0,21,0 );
ReefAngel.Relay.Set( Moon_Lights, !ReefAngel.Relay.Status( Actinic_Lights ) );
ReefAngel.StandardLights( Sump_Fan,13,0,21,0 );
ReefAngel.Relay.Set(DeNit_Doser,(now()-3600)%21600<1200); // Runs for 1200s every 21600 seconds
ReefAngel.Relay.Set(DeNit_Pump,((now()-3600)-1200)%21600<1200); // Runs for 1200s every 21600 seconds with 1200s offset
ReefAngel.WaterLevelATO(ATO_Pump,720,32,32); // Enable ATO the ATO
if (ReefAngel.Relay.Status(DeNit_Pump)) // Check to see if DeNit Pump is on and update time is empty
{
ATOUpdate = now(); // If so, set the update time to now
}
if (now() - ATOUpdate < 120) // If it hasnt been 120 seconds turn off the port
{
ReefAngel.WaterLevelATO(ATO_Pump,720,0,1);
}
//Disable ATO if Salinity is below 33.5
if (ReefAngel.Params.Salinity<335) ReefAngel.Relay.Off(ATO_Pump);
{
ReefAngel.PWM.SetActinic( ElseMode(40,20,true )); // ElseMode on sync mode, 40 +/- 20%
ReefAngel.PWM.SetDaylight( ElseMode(80,20,false )); // ElseMode on Anti-sync mode, 80 +/- 20%
}
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetActinic(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetActinic(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetActinic(30);
if( ReefAngel.DisplayedMenu==FEEDING_MODE ) ReefAngel.PWM.SetDaylight(20);
if( ReefAngel.DisplayedMenu==WATERCHANGE_MODE ) ReefAngel.PWM.SetDaylight(0);
if (hour()<12 || hour()>=22) ReefAngel.PWM.SetDaylight(30);
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "Sacohen","xxxxxxx" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Water Level
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
ConvertNumToString(text, ReefAngel.Params.Salinity, 10);
strcat(text," ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,39,75,"Salinity:");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,99,75,text);
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
pingSerial();
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox(12, 104, TempRelay);
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
{
// Static's only initialize the first time they are called
static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
static int Delay = random( 500, 3000); // Set the initial delay
static int NewSpeed = MidPoint; // Set the initial speed
static int AntiSpeed = MidPoint; // Set the initial anti sync speed
if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
{
Delay=random(500,5000); // If so, come up with a new delay
int ChangeUp = random(Offset); // Amount to go up or down
if (random(100)<50) // 50/50 chance of speed going up or going down
{
NewSpeed = MidPoint - ChangeUp;
AntiSpeed = MidPoint + ChangeUp;
}
else
{
NewSpeed = MidPoint + ChangeUp;
AntiSpeed = MidPoint - ChangeUp;
}
LastChange=millis(); // Reset the time of the last change
}
if (WaveSync)
{
return NewSpeed;
}
else
{
return AntiSpeed;
}
}
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:42 am
by rimai
Go check your portal now

Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:51 am
by Sacohen
Great.
Thanks.
Sorry for being so thickheaded.
Now back to the original problem, the temp probes.
You think it's an issue with the 3 probes?
Do you want me to send them back with the RA board and you'll send me replacement probes or what?
Do you care if I send you the original board or the replacement back. It doesn't matter to me if you have a preference.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 10:58 am
by rimai
Yes, just send me either board with the probes and I'll look at them.
Re: Everything is reading 0.
Posted: Thu Aug 29, 2013 11:01 am
by Sacohen
OK. I'll get them out tomorrow.
Everything is reading 0.
Posted: Thu Aug 29, 2013 4:15 pm
by lnevo
The problem you had was on the new board you never set the speed/duration and mode for the dcpumps...just go to the portal and do that and your original code should be fine. You basically were not in Custom mode...
When i fix your code i'll program it to use the new dcpump stuff but you'll still need to set those from the portal.
Re: Everything is reading 0.
Posted: Fri Aug 30, 2013 8:20 am
by Sacohen
Thanks to both of you.
Lee when you work on my code could you add the random DC wave like you did for PaulTurner911 (if it's not too much trouble)?