RA* Unable to Update via Remote Upload

Do you have a question on how to do something.
Ask in here.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA* Unable to Update via Remote Upload

Post by rimai »

Sorry for the delay.
Yeap, looks like something in your code.
Let's start by adding a few things and seeing if it holds up.

Code: Select all

void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.Star();
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    ReefAngel.FeedingModePortsE[0] = Port2Bit | Port8Bit;
    ReefAngel.FeedingModePortsE[1] = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    ReefAngel.WaterChangePortsE[0] = Port1Bit | Port2Bit | Port4Bit | Port5Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[1] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.OverheatShutoffPortsE[0] = Port4Bit | Port6Bit;
    ReefAngel.OverheatShutoffPortsE[1] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = 0;
    ReefAngel.LightsOnPortsE[1] = 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( 830 );
    // Feeeding and Water Change mode speed

    // Ports that are always on
    ReefAngel.Relay.On( Box1_Port5 );
    ReefAngel.Relay.On( Box1_Port8 );

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


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

void loop()
{
    ReefAngel.DosingPumpRepeat( Box1_Port1,0,60,83 );//Alk
    ReefAngel.SingleATO( true,Box1_Port2,1000,0 );//ATO
    ReefAngel.DosingPumpRepeat( Box1_Port3,30,60,82 );//Cal
    ReefAngel.StandardHeater( T1_PROBE,Box1_Port4,780,785 );
    ReefAngel.StandardLights( Box1_Port6,12,0,19,0 ); //T5
    ReefAngel.StandardLights( Box1_Port7,23,0,6,0 ); //Refugium Lights
    ReefAngel.PWM.SetDaylight( PWMSlope( 9,0,17,0,15,70,60,0 ) );
    ReefAngel.PWM.SetActinic( PWMSlope( 9,0,17,0,15,70,60,0 ) );
    ReefAngel.PWM.SetDaylight2( PWMSlope( 9,0,17,0,15,70,60,0 ) );
    ReefAngel.PWM.SetActinic2( PWMSlope( 9,0,17,0,15,70,60,0 ) );

    boolean buzzer=false;
    if ( ReefAngel.isATOTimeOut() ) buzzer=true;
    if ( ReefAngel.isOverheat() ) buzzer=true;
    if ( buzzer ) ReefAngel.BuzzerOn(2); else ReefAngel.BuzzerOff();

    ////// Place your custom code below here
    static unsigned long feeding;
    if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();
    
    //vacation mode
    if (hour()==17 && minute()==0 && second()==0)
    {
        ReefAngel.FeedingModeStart();
    }
    
    if (hour() >= 8 || ReefAngel.Params.PH > 860)
    {
        ReefAngel.Relay.Off (Box1_Port1);
        ReefAngel.Relay.Off (Box1_Port3);
    }

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

    ReefAngel.Network.Cloud();
    // This should always be the last line
    ReefAngel.ShowTouchInterface();
}
I removed the DCPump stuff.
See if this works now.
I noticed that you had both LED dimming and DCPump control using the same channels.
Roberto.
Post Reply