what do i need to add/remove to have port 3 turn on when dimming add-on channel 0 is grater then 0% and and off if at 0%
what do i need to add/remove to have port 4 turn on when dimming add-on channel 1 is grater then 0% and and off if at 0%
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 <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
////// Place global variable code below here
// Define Custom Memory Locations
#define Mem_B_AtoHourInterval 101
void init_memory() {
// Initialize Custom Memory Locations
InternalMemory.write(Mem_B_AtoHourInterval,1); //mb101
}
////// 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 = Port1Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port5Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.SingleATO(true, Port1 , InternalMemory.ATOExtendedTimeout_read(), InternalMemory.read(Mem_B_AtoHourInterval));
ReefAngel.StandardLights( Port3,9,0,19,0 );
ReefAngel.StandardLights( Port4,9,0,19,0 );
ReefAngel.StandardHeater( Port5,775,785 );
ReefAngel.PWM.SetChannel( 0, PWMParabola(9,0,20,0,0,65,0) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(9,0,20,0,0,45,0) );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( NutrientTransport,70,10 );
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = Sync;
ReefAngel.DCPump.ExpansionChannel[5] = AntiSync;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "troylong45" );
ReefAngel.ShowInterface();
}