Page 1 of 1

Fresh start

Posted: Sun Oct 21, 2012 6:54 am
by topjimmy
How can I get the unit back to the factory default? I have reloded the sketch, but no new one's seem to work. I want to update the library and wipe the memory to be fresh for the new one.

Re: Fresh start

Posted: Sun Oct 21, 2012 7:04 am
by dbmet
Did you use the Arduino and Click tools and Restore Preloaded Code? Never tried this I just happened to see it in the menu and thought I would ask..

Re: Fresh start

Posted: Sun Oct 21, 2012 7:25 am
by binder
dbmet wrote:Did you use the Arduino and Click tools and Restore Preloaded Code? Never tried this I just happened to see it in the menu and thought I would ask..
yes, this will restore the controller to the factory default settings.

Re: Fresh start

Posted: Sun Oct 21, 2012 10:16 am
by topjimmy
I did do that. But when I make a new sketch and upload it does not seem to be working. For example, I have port 7,8 always on for return & skimmer, but they stay off. I think I must have messed up the initial mem when I set it up months ago.

Re: Fresh start

Posted: Sun Oct 21, 2012 10:38 am
by binder
topjimmy wrote:I did do that. But when I make a new sketch and upload it does not seem to be working. For example, I have port 7,8 always on for return & skimmer, but they stay off. I think I must have messed up the initial mem when I set it up months ago.
Can you post the code that you uploaded that keeps ports 7 & 8 off? Internal memory does not affect ports that are marked as Always On.

Re: Fresh start

Posted: Sun Oct 21, 2012 12:15 pm
by topjimmy

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 <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 = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 869 );


    // Ports that are always on

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.StandardHeater( Port1,770,790 );
    ReefAngel.StandardATO( Port2,120 );
    ReefAngel.StandardLights( Port3,9,0,22,0 );
    ReefAngel.WavemakerRandom( Port5,60,100 );
    ReefAngel.WavemakerRandom( Port6,51,94 );
    ReefAngel.PWM.SetDaylight( PWMParabola(9,40,21,30,0,100,0) );
    ReefAngel.PWM.SetActinic( PWMParabola(9,0,22,0,0,100,0) );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}


Re: Fresh start

Posted: Sun Oct 21, 2012 12:28 pm
by dbmet
Where it shows Ports always on you don't have anything there or any where else that I saw..

Heres what I had for my ports that where always on --- You will need to change whatever ports you want.
// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port6 );

Re: Fresh start

Posted: Sun Oct 21, 2012 12:30 pm
by topjimmy
yeah I noticed that too, but I did choose them in the wizard. So now I down loaded the new version, sent the config up and my screen says no internal memory found

Re: Fresh start

Posted: Sun Oct 21, 2012 12:39 pm
by rimai
Oh, yeah...
There was a version way back that had that bug on the Wizard.
This was still a beta version of the Wizard.
Now that you updated the libraries, it should generate the correct code.
To go past the internal memory not found, you must upload the new InitialInternalMemory code.
File->Sketchbook->Example Codes->InitialInternalMemory

Re: Fresh start

Posted: Sun Oct 21, 2012 5:04 pm
by topjimmy
That did it.

Thanks