controller reseting every minute

Basic / Standard Reef Angel hardware
Post Reply
pilonstar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am

controller reseting every minute

Post 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
Slow down to speed up
Image
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: controller reseting every minute

Post by rimai »

Does it do that with the Template code too?
File->Sketchbook->Example Codes->Template
Roberto.
pilonstar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am

Re: controller reseting every minute

Post 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.
Slow down to speed up
Image
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: controller reseting every minute

Post 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.
Roberto.
pilonstar
Posts: 64
Joined: Tue Mar 20, 2012 2:56 am

Re: controller reseting every minute

Post 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
Slow down to speed up
Image
Image
Post Reply