Page 1 of 1

Lightsoverride error when using Wizard

Posted: Tue May 15, 2018 11:44 am
by stolat01
I'm using the Wizard to refresh my code but it won't compile! My setup is relatively simple, I am programming the relay plus an AISOL in the Low port. Compiling gives me a Lightsoverride error. I searched through all the forum and from a topic related to a Jebeo I tried a the few lines of code they suggested, but none of those changes would allow my wizard-generated code to compile. I welcome any suggestions. Here's a copy of my code produced by the Wizard (less my portal information):

#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 <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.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.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port3Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 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( 869 );

// Setup ATO Port for AI communication
ReefAngel.AI.SetPort( lowATOPin );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port8 );

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


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

void loop()
{
ReefAngel.StandardFan( Port3,780,810 );
ReefAngel.CO2Control( Port5,620,670 );
ReefAngel.StandardLights( Port7,20,0,8,0 );
ReefAngel.AI.SetChannel( White, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( RoyalBlue, PWMParabola(9,0,20,0,15,100,15) );
////// Place your custom code below here


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

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

Re: Lightsoverride error when using Wizard

Posted: Thu May 17, 2018 9:52 am
by rimai
I just checked this and indeed it is a problem in the libraries.
Simply add this anywhere in the code:

Code: Select all

//ReefAngel.PWM.
It is going to enable PWM without adding anything to your code, but PWM is required.

Re: Lightsoverride error when using Wizard

Posted: Thu May 17, 2018 10:51 am
by stolat01
That did it. Thanks!