Date and time issue
Date and time issue
Not sure what's going on. I have everything coded from the wizard and I am running the dimming module. For some reason, the lights are not staying on schedule. They don't come on at the right time and the dimming is not staying on schedule. When I go to the portal and update time, it jumps back in line. I have to do this at least 2x a day. Any thoughts?
Re: Date and time issue
It jumps back in time right when you update it through the portal or later on?
Roberto.
Re: Date and time issue
Right when I update it.
Re: Date and time issue
It does the same with my iPhone. Don't have android.
Re: Date and time issue
I learned something today...
I didn't know iphone had support to update date/time
I didn't know iphone had support to update date/time
Roberto.
Re: Date and time issue
Glad to be the one to bring that little nugget to light.
Still not sure why the lights and dimming do not keep on schedule unless I do an update to the time/date.
Could it have to do with the internal memory?
Still not sure why the lights and dimming do not keep on schedule unless I do an update to the time/date.
Could it have to do with the internal memory?
Re: Date and time issue
I had an issue with the battery in my RA. One terminal was loose so anytiem the controller reset I lost the time... just something to consider looking at..
Re: Date and time issue
I had to do it three times today and then it wouldn't even turn the lights off.
I ran the initial memory script and then just built everything into the pde. That should erase the internal memory and all run straight off the pde right?
I ran the initial memory script and then just built everything into the pde. That should erase the internal memory and all run straight off the pde right?
Re: Date and time issue
Yes. It seems to be keeping the right time.
Re: Date and time issue
Does it keep the time if you power off RA and bring the power back on? Just to be sure, wait about 10 seconds before you power back on.
I'm not quite understanding yet how it is not following the schedule, so I want to make sure that the time is correct and that it is keeping the time correctly and following it correctly before we move on to something else.
I'm not quite understanding yet how it is not following the schedule, so I want to make sure that the time is correct and that it is keeping the time correctly and following it correctly before we move on to something else.
Roberto.
Re: Date and time issue
Nope - I unplugged it and it came back on 25 minutes earlier. Was 9:15 and now it's 8:52
Then I go back to the iPhone app and update time and it goes back.
Then I go back to the iPhone app and update time and it goes back.
Re: Date and time issue
When I got up this morning the time on the controller was 12:46am - actual time 6:48am.
Re: Date and time issue
Ok. Am I sending everything back or just the board?
Re: Date and time issue
I still have the 32 bit board from the upgrade. I can swap out the plus board and send it - might need some help slimming Down the code to run on the old board.
Re: Date and time issue
Here is the code:
Thanks,
Brian
Please let me know how I can slim this down to work with the 32 bit board...#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
////// 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 = Port4Bit | Port6Bit | Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 850 );
// Ports that are always on
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DosingPumpRepeat( Port1,0,360,4 );
ReefAngel.DosingPumpRepeat( Port2,0,360,4 );
ReefAngel.StandardLights( Port3,10,0,22,0 );
ReefAngel.Relay.DelayedOn( Port4,10 );
ReefAngel.StandardHeater( Port5,795,805 );
ReefAngel.Relay.Set( Port8, !ReefAngel.Relay.Status( Port3 ) );
ReefAngel.PWM.SetChannel( 0, PWMParabola(10,0,22,0,10,35,10) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(10,30,21,30,0,30,0) );
ReefAngel.PWM.SetChannel( 2, PWMParabola(10,30,21,30,0,5,0) );
ReefAngel.PWM.SetChannel( 3, PWMParabola(10,30,21,30,0,10,0) );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "blawson" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}
Thanks,
Brian
Re: Date and time issue
Well how about that. Guess I didn't need the upgraded board.
Re: Date and time issue
So this is interesting... The old board is keeping time fine. When I came home from work, the LEDs didn't look right - too much blue. So I check the time and it was spot on. The screen showed the right led levels. I unplugged the dimmer box and only two sets of the four LEDs lit. Plugged it back in and nothing lit. I played with it I bit and then decided to check if the new board would light them. Switched the boards and viola they worked. Switched the boards back and they are working again.
I have no ideal what happened but wanted to see if anyone had some thoughts?
I have no ideal what happened but wanted to see if anyone had some thoughts?