Page 1 of 1
Dimming expansion
Posted: Mon Jan 13, 2014 11:05 pm
by chapboogie
I just setup my dimming expansion, and moved my lights over to it in channels 0&1. Now when I use the lights on command it won't work because of not knowing where to dim. How do I modify?
Sent from my SCH-I535 using Tapatalk
Re: Dimming expansion
Posted: Wed Jan 15, 2014 11:35 am
by rimai
Which port is your drivers connected to?
Or what do you have for ReefAngel.LightsOnPorts ??
Re: Dimming expansion
Posted: Wed Jan 15, 2014 3:08 pm
by chapboogie
My lights are now in channels 0&1 of the expansion. The sketch shows lights on ports= Port5bit and Port6bit
Sent from my SCH-I535 using Tapatalk
Re: Dimming expansion
Posted: Wed Jan 15, 2014 3:57 pm
by rimai
Try this:
Code: Select all
if (ReefAngel.Relay.isMaskOn(Port6))
{
ReefAngel.PWM.SetChannel(0,50);
ReefAngel.PWM.SetChannel(1,50);
}
Re: Dimming expansion
Posted: Wed Jan 15, 2014 10:58 pm
by chapboogie
I don't know where to put this. This is my first edit from something that was made in the wizard.
Sent from my SCH-I535 using Tapatalk
Re: Dimming expansion
Posted: Wed Jan 15, 2014 11:07 pm
by chapboogie
This is my sketch
#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 <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 = Port1Bit | Port2Bit | Port3Bit | Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port3Bit | Port4Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port5Bit | Port6Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port4Bit | 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( 843 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.Relay.DelayedOn( Port2,10 );
ReefAngel.SingleATO( true,Port3,2000,0 );
ReefAngel.StandardHeater( Port4,796,814 );
ReefAngel.StandardLights( Port5,13,0,23,0 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.PWM.SetChannel( 0, PWMParabola(13,0,23,0,9,75,9) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(13,30,22,30,9,54,9) );
ReefAngel.PWM.SetChannel( 2, MoonPhase() );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( ReefCrest,90,10 );
ReefAngel.DCPump.DaylightChannel = AntiSync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "chapboogie" );
ReefAngel.ShowInterface();
}
Re: Dimming expansion
Posted: Thu Jan 16, 2014 5:41 am
by lnevo
See the comments where it says place your custom code above and below here? Thats where it goes.
Re: Dimming expansion
Posted: Fri Jan 17, 2014 7:17 pm
by chapboogie
It works now. Thanks a bunch. So much I want to tackle soon.
Sent from my SCH-I535 using Tapatalk