Lights stay on!

Do you have a question on how to do something.
Ask in here.
Post Reply
fbret
Posts: 2
Joined: Thu Feb 20, 2014 9:37 am

Lights stay on!

Post by fbret »

Hi, bear with me - I've only been using RA for 24 hours ( but I am a coder :-)).

I used the wizard to generate the following code:
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.AddStandardMenu(); // Add Standard Menu

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddPHExpansion(); // pH Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port2Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit | Port4Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T2_PROBE;
ReefAngel.OverheatProbe = T2_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );
InternalMemory.ActinicOffset_write(30);

// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );

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


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

void loop()
{
ReefAngel.StandardHeater( Port1,771,781 );
//ReefAngel.StandardFan( Port5,771,781 );
ReefAngel.PWM.SetDaylight( PWMSlope(10,0,16,0,0,100,30,15) );
ReefAngel.PWM.SetActinic( PWMSlope(9,30,17,0,0,100,30,15) );
////// Place your custom code below here


//deal with hood fan
if (ReefAngel.Params.Temp[T1_PROBE] >= 950) ReefAngel.Relay.On(Port5); // If sensor 1 temperature >= HighTemp - turn on fan
if (ReefAngel.Params.Temp[T1_PROBE] <= 785) ReefAngel.Relay.Off(Port5); // If sensor 1 temperature <= LowTemp - turn off fan


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

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


The issue is that at 8am, the white and actinic pwm channels are still @ 15% and I suspect the tank spent the night @ 15% :-(

What am I doing wrong?

Thanks

-Fred
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lights stay on!

Post by rimai »

Code: Select all

 ReefAngel.PWM.SetDaylight( PWMSlope(10,0,16,0,0,100,30,15) );
 ReefAngel.PWM.SetActinic( PWMSlope(9,30,17,0,0,100,30,15) );
The last parameter is the % that it will output when not in your light cycle.
Change that to a zero.
Roberto.
fbret
Posts: 2
Joined: Thu Feb 20, 2014 9:37 am

Re: Lights stay on!

Post by fbret »

omg... i'm such a tool!

Thanks a million!


-Fred
ReEfnWrX
Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX

Re: Lights stay on!

Post by ReEfnWrX »

Doesn't setting that to 0 disable the lights on feature?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lights stay on!

Post by rimai »

nope. the lights on actually overrides the channels no matter what.
Roberto.
ReEfnWrX
Posts: 234
Joined: Tue Nov 05, 2013 8:40 am
Location: Houston TX

Re: Lights stay on!

Post by ReEfnWrX »

What Dimming % does lights on override with? Is this an adjustable value?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lights stay on!

Post by rimai »

It uses the LED PWM Daylight and Actinic values stored in the internal memory.
You can change them with the standard menu or with the android app.
Roberto.
Post Reply