Page 1 of 1

controller reseting every minute

Posted: Sat Aug 25, 2012 1:28 am
by pilonstar
Hi Folks!

I find my controller lately reseting by itself every minute and sometimes every second.
I have tried to reset the controller and setup the memory and started it from 0 but I doesn´t
work...keeps reseting. I have a video if it helps.

http://www.youtube.com/watch?v=-wE6IUuWwXc

[youtube]http://www.youtube.com/watch?v=-wE6IUuWwXc[/youtube]


Thank you in advance.

Erick

Re: controller reseting every minute

Posted: Sat Aug 25, 2012 9:06 am
by rimai
Does it do that with the Template code too?
File->Sketchbook->Example Codes->Template

Re: controller reseting every minute

Posted: Sun Aug 26, 2012 2:59 am
by pilonstar
rimai wrote:Does it do that with the Template code too?
File->Sketchbook->Example Codes->Template
I have tried that one too and stops for a while but once I put mine goes nuts:

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
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    ReefAngel.FeedingModePortsE[0] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    ReefAngel.WaterChangePortsE[0] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
        ReefAngel.Relay.On( Port2 );
        ReefAngel.Relay.On( Port3 );
        ReefAngel.Relay.On( Port5 );
        ReefAngel.Relay.On( Port7 );
        ReefAngel.Relay.On( Port8 );
        ReefAngel.Relay.On( Box1_Port3 );
        ReefAngel.Relay.On( Box1_Port4 );
        ReefAngel.Relay.On( Box1_Port5 );
        ReefAngel.Relay.On( Box1_Port6 );
        ReefAngel.Relay.On( Box1_Port7 );
        ReefAngel.Relay.On( Box1_Port8 );
    }

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

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


void loop()
{
    ReefAngel.MHLights(Port1);
    ReefAngel.StandardHeater(Box1_Port2);  
    ReefAngel.StandardLights(Port4);
    ReefAngel.StandardFan( Port6 );
    ReefAngel.SingleATOLow( Box1_Port1 );

 
    ////// Place your custom code below here
      ReefAngel.RF.RadionChannels[Radion_Intensity]=75;
      ReefAngel.RF.RadionChannels[Radion_White]=PWMParabola(12,0,18,0,0,100,0);
      ReefAngel.RF.RadionChannels[Radion_RoyalBlue]=PWMParabola(9,0,22,0,0,100,0);
      ReefAngel.RF.RadionChannels[Radion_Red]=PWMParabola(9,0,22,0,0,5,0);
      ReefAngel.RF.RadionChannels[Radion_Green]=PWMParabola(9,0,22,0,0,10,0);
      ReefAngel.RF.RadionChannels[Radion_Blue]=PWMParabola(10,0,21,0,0,60,0);
      if (second()==0) ReefAngel.RF.RadionWrite();


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

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

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // I/O Expansion
    byte bkcolor;
    x = 14;
    y = 11;
    for ( int a=0;a<6;a++ )
    {
      ReefAngel.LCD.DrawCircleOutline( x+(a*20),y,4,COLOR_MEDIUMORCHID );
      if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; else bkcolor=COLOR_GRAY;
      ReefAngel.LCD.FillCircle( x+(a*20),y,2,bkcolor );
    }
    pingSerial();

    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 26, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 26, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Salinity
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,15,63, "SAL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,39,63, ReefAngel.Params.Salinity );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 82, TempRelay );
    pingSerial();

    // Relay Expansion
    TempRelay = ReefAngel.Relay.RelayDataE[0];
    TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
    TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
    ReefAngel.LCD.DrawOutletBox( 12, 101, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
It happened when I messed with the Radion codes :(
Thanks for your patience and fast reply.

Re: controller reseting every minute

Posted: Sun Aug 26, 2012 8:25 am
by rimai
I posted the original firmare on the other thread for you to try to revert back and see if it makes any difference.

Re: controller reseting every minute

Posted: Tue Aug 28, 2012 2:07 am
by pilonstar
rimai wrote:I posted the original firmare on the other thread for you to try to revert back and see if it makes any difference.
After resetting all from zero, the controller is working back perfect! yay!! Thank you so much Mr Rimai, Really appreciated your patience and help :D