Page 1 of 1
Code not generating changes !
Posted: Sat Jan 05, 2013 2:37 pm
by cjrudy
I am using the Wizard to generate code, it successfully uploads the code, the controller reboots but the changes are not there. The ports that are on/off never change from the pre-loaded settings. I have tried using the code option as well as the internal memory option. Any ideas ?
Re: Code not generating changes !
Posted: Sat Jan 05, 2013 9:49 pm
by rimai
Can you try uploading the ControllerTester code?
File->Sketchbook->Example Codes->ControllerTester
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 6:29 am
by cjrudy
I uploaded that code, which definitely worked. I tried to upload custom code again which worked but I found the problem. For some reason the only ports that work right are the "Always On" ports, any ports with certain parameters like ATO, Heater or Lights dont seem to program correctly. For example , heater ports show off even though they are programmed to be on.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 6:51 am
by dbmet
Can you copy and paste the code your here?
Code not generating changes !
Posted: Sun Jan 06, 2013 7:09 am
by lnevo
Is your date/time set correctly?
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 8:33 am
by cjrudy
Yes, date and time are correct, here is my code
#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 <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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.ActinicLights( Port1 );
ReefAngel.DayLights( Port2 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.StandardHeater( Port4 );
ReefAngel.StandardATO( Port8 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "cjrudy" );
ReefAngel.ShowInterface();
}
Code not generating changes !
Posted: Sun Jan 06, 2013 9:03 am
by lnevo
The code is using memory settings for your devices. Check all your times and temp settings in the portal under internal memory
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 9:39 am
by cjrudy
Ok, well maybe I am not understanding this, the code is uploaded, the portal internal memory stettings match but the ports on the controller and the portal are different and neither is actually what I programmed
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 9:45 am
by cjrudy
As programmed 1&2 are lights, 3&4 are heaters, 5-7 are always on and 8 is ATO which should be on
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 10:24 am
by rimai
Would it be possible to upload a code with hard coded settings to begin and move to internal memory once you get things figured out and you know that the controller and the portal all all working and communicating correctly?
Those ports on your Portal indicate that you overrode several of the ports. Off and On are overrides. The Auto is when the controller is able to control them. If you override the port to on, it will always stay on, no matter what the controller is supposed to do with that port.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 1:00 pm
by cjrudy
Ok, good to know about the On and Off overrides, I uploaded a code with hard coded settings and I thinks its working, all the ports show auto. My only issue now is working with a separate ATO switch. When I first set up the controller I plugged my ATO switch into port 1 and it would timeout after 60 seconds. Now that I programmed all the ports, I set the ATO on port 8 but its not on because I am using my own ATO switch.
So is there any simple way to set up a timer on any port ?
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 4:07 pm
by rimai
You have your own ATO system or your own float switch?
I'm not quite understanding your question.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 5:40 pm
by cjrudy
My own system, switches , pump etc.
When I first got the RA, I plugged my ATO pump into Port 1 which was always on but would only run for 60 seconds max. Now I have programmed all the ports and Port8 is now the ATO but it always shows off, not sure why.
I am new at this so maybe i am not fully understanding everything.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 5:44 pm
by rimai
You probably just need to set port 8 to be always on, if you have your own system.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 5:52 pm
by cjrudy
Thats how i have it set now, looking to have a timer function on the ATO as a fail safe, any way to set that up on a specific port?
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 5:56 pm
by rimai
Not with your own system.
RA needs to know when to start the timer and with your own system, it would never know.
Code not generating changes !
Posted: Sun Jan 06, 2013 6:20 pm
by lnevo
Your code is setting the port to an ato port...if you wanted ra to backup, you would need your float switches setup and plugged in. It will turn the port on only when atolow is active and off when ato high is active or your timeout..at least thats how your code above is written. Otherwise just make it an always on port.
Re: Code not generating changes !
Posted: Sun Jan 06, 2013 6:58 pm
by cjrudy
Got it, thanks for everyone's help.
I am just using an "AutoTopOff.com" float switch setup, maybe I can just wire the two float switches I am currently using into the RA Connectors.
Code not generating changes !
Posted: Sun Jan 06, 2013 7:36 pm
by lnevo
No reason it wouldn't. Thats the way i would go
at least then you can monitor and alert on your float switch statuses etc.