wp40 codes
wp40 codes
im looking for different codes for the wp40 that i can toggle between, like nutrient export, reef crest and so on. right now i have one mode but i would like to have a few to switch between.
Re: wp40 codes
Here's mine
Code: Select all
if (hour()>=8 && hour()<12)
{
ReefAngel.PWM.SetDaylight( TidalSwellMode(60,true) ); // Tidal Swell at 60% on sync mode
ReefAngel.PWM.SetActinic( TidalSwellMode(60,false) ); // Tidal Swell at 60% on anti-sync mode
}
else if (hour()>=12 && hour()<16)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(80,20,true) ); // ReefCrest at 80% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(80,20,false) ); // ReefCrest at 80% + - 20 on anti-sync mode
}
else if (hour()>=16 && hour()<17)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(75,90,2000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(75,90,2000,false) ); // Nutrient Transport on anti-sync mode
}
else if (hour()>=17 && hour()<20)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(80,20,true) ); // ReefCrest at 75% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(80,20,false) ); // ReefCrest at 75% + - 20 on anti-sync mode
}
else if (hour()>=20 && hour()<24)
{
ReefAngel.PWM.SetDaylight( TidalSwellMode(60,true) ); // Tidal Swell at 60% on sync mode
ReefAngel.PWM.SetActinic( TidalSwellMode(60,false) ); // Tidal Swell at 60% on anti-sync mode
}
else
{
ReefAngel.PWM.SetDaylight( LongPulseMode(0,40,10,true) ); // Long pulse at 40% with 10s pulse on sync mode
ReefAngel.PWM.SetActinic( LongPulseMode(0,40,10,false) ); // Long pulse at 40% with 10s pulse on anti sync mode
Barry
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Re: wp40 codes
So with that you can manually switch between the two modes?
Re: wp40 codes
thats not working for me...it gives me an error outside that code, but without that code it runs fine. you have that running on your system?
Re: wp40 codes
You cannot change the modes on the fly with this code. It just runs different modes thoughout the day. I believe someone has code where you can change modes on the menu screen.
I am running this, are you putting it in the right spot?
I am running this, are you putting it in the right spot?
Barry
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Re: wp40 codes
i put it between the post custom code below / above here
Re: wp40 codes
That's right. Strange
Code: Select all
////// Place your custom code below here
if (hour()>=8 && hour()<12)
{
ReefAngel.PWM.SetDaylight( TidalSwellMode(60,true) ); // Tidal Swell at 60% on sync mode
ReefAngel.PWM.SetActinic( TidalSwellMode(60,false) ); // Tidal Swell at 60% on anti-sync mode
}
else if (hour()>=12 && hour()<16)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(80,20,true) ); // ReefCrest at 80% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(80,20,false) ); // ReefCrest at 80% + - 20 on anti-sync mode
}
else if (hour()>=16 && hour()<17)
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(75,90,2000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(75,90,2000,false) ); // Nutrient Transport on anti-sync mode
}
else if (hour()>=17 && hour()<20)
{
ReefAngel.PWM.SetDaylight( ReefCrestMode(80,20,true) ); // ReefCrest at 75% + - 20 on sync mode
ReefAngel.PWM.SetActinic( ReefCrestMode(80,20,false) ); // ReefCrest at 75% + - 20 on anti-sync mode
}
else if (hour()>=20 && hour()<24)
{
ReefAngel.PWM.SetDaylight( TidalSwellMode(60,true) ); // Tidal Swell at 60% on sync mode
ReefAngel.PWM.SetActinic( TidalSwellMode(60,false) ); // Tidal Swell at 60% on anti-sync mode
}
else
{
ReefAngel.PWM.SetDaylight( LongPulseMode(0,40,10,true) ); // Long pulse at 40% with 10s pulse on syncy mode
ReefAngel.PWM.SetActinic( LongPulseMode(0,40,10,false) ); // Long pulse at 40% with 10s pulse on on anti-sync mode
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.ShowInterface();
}
Barry
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Current tank info: 150g mixed reef
"Some of the worst mistakes of my life were hair cuts" -Jim Morrison
Re: wp40 codes
on this code what is the pump running at? i want the max to be 100%, is it saying the max is 75 or 90?
Code: Select all
{
ReefAngel.PWM.SetDaylight( NutrientTransportMode(75,90,2000,true) ); // Nutrient Transport on sync mode
ReefAngel.PWM.SetActinic( NutrientTransportMode(75,90,2000,false) ); // Nutrient Transport on anti-sync mode
}
Re: wp40 codes
Got my 2 wp-40s up and running, is there a way to get them to go to half power in the evening? Kind of like a night mode? Here is my code....
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 <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
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit | Port8Bit;
// 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;
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.SingleATOLow( Port1 );
ReefAngel.DayLights( Port2 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.DayLights( Port8 );
ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMParabola();
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = Sync;
ReefAngel.DCPump.ExpansionChannel[1] = AntiSync;
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( "cgonser" );
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_BLUE,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_BLUE,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_BLUE,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
pingSerial();
// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}
void DrawCustomGraph()
{
}