My Jebao "Else" mode
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Lee, thank you!
So I uploaded the code. I "think" it's working. I'm trying to base whether or not its working by looking at the impeller but I guess my settings are so close together, it all looks the same.....a few questions.
You said you took out the 37 and 7 from the Else mode but I see it in the custom code section. You also said that I can define the speed in the portal, does that override the 37? The 7 is the percentage up and down for speed and since there isn't an option in the portal for setting that, is the 7 a constant and the variable would be the 37? I do understand that duration is overlooked because its not relevant for this mode.
and also just so I understand, if i want to hard code it what would need to happen and does that mean I will not be able to switch to other modes via the portal?
I really appreciate your time!
So I uploaded the code. I "think" it's working. I'm trying to base whether or not its working by looking at the impeller but I guess my settings are so close together, it all looks the same.....a few questions.
You said you took out the 37 and 7 from the Else mode but I see it in the custom code section. You also said that I can define the speed in the portal, does that override the 37? The 7 is the percentage up and down for speed and since there isn't an option in the portal for setting that, is the 7 a constant and the variable would be the 37? I do understand that duration is overlooked because its not relevant for this mode.
and also just so I understand, if i want to hard code it what would need to happen and does that mean I will not be able to switch to other modes via the portal?
I really appreciate your time!
Jack
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Another thing that's strange..I changed this code:
To this:
Because I want to start out slow and tweak as needed upwards. I assume that 35 means the median speed and 5 is the swing so the pump should run anywhere between 30 and 40% power? If this assumption is correct, then why does my actinic settings show it below 30% as well as above 40% as part of the else mode cycle? Shouldn't it be no lower than 30 and no higher than 40? I don't see anything else in the code that would overrule my assumption. The only thing I can think of is if the "duration" in the portal is making it this way (it's currently defaulted to 10)? But from past posts, I thought duration was ignored in else mode. Thoughts?
Thanks again.
Code: Select all
if (ReefAngel.DCPump.Mode==Custom) {
ReefAngel.PWM.SetActinic( ElseMode(ReefAngel.DCPump.Speed,ReefAngel.DCPump.Duration,true)); // ElseMode on sync mode, 37 +/- 7%
Code: Select all
if (ReefAngel.DCPump.Mode==Custom) {
ReefAngel.PWM.SetActinic( ElseMode(ReefAngel.DCPump.Speed,ReefAngel.DCPump.Duration,true)); // ElseMode on sync mode, 35 +/- 5%
Thanks again.
Jack
Re: My Jebao "Else" mode
The 37 and 7 you see there are the comments left behind. I reused duration for the 7. So you can adjust it if you like. The best way to compare is go from constant mode to custom and see what happens.
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Ah ok..so that line is just FYI.
So if I set my speed via the portal to 35. What will my speed variation be? That's what I am confused about. I want to know the low and high.
thank you.
So if I set my speed via the portal to 35. What will my speed variation be? That's what I am confused about. I want to know the low and high.
thank you.
Jack
Re: My Jebao "Else" mode
The duration will be the +/-
If you don't want it to be you can change it back to 7
If you don't want it to be you can change it back to 7
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao
So now I am even more confused. If that line above is commented out (after "///") and the controller doesn't recognize it as code, how does changing the +/- do anything?lnevo wrote:The duration will be the +/-
If you don't want it to be you can change it back to 7
For this purposes, let's say I want the pump to fluctuate from 30% to 40% in else mode. What would I do to the code or portal settings?
Thanks for being patient.
Jack
Re: My Jebao "Else" mode
35 for speed
5 for duration
I am reusing the duration field...double purpose
5 for duration
I am reusing the duration field...double purpose
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Ah, I see it now.
This is the key part that sets that, right?
The "true" means portal set?
Also..of interest..the pump went all night between 25 and 45 and the pump did not stop. Maybe the lowest setting CAN go below 30% consistently?
This is the key part that sets that, right?
Code: Select all
ReefAngel.PWM.SetActinic( ElseMode(ReefAngel.DCPump.Speed,ReefAngel.DCPump.Duration,true))
Also..of interest..the pump went all night between 25 and 45 and the pump did not stop. Maybe the lowest setting CAN go below 30% consistently?
Jack
Re: My Jebao "Else" mode
No the true defines sync or anti-sync
The ReefAngel.DCPump.Speed and ReefAngel.DCPump.Duration are the key. They are getting their values from internal memory because i did not disable ReefAngel.DCPump.UseMemory.
Those memory locations are set via the portal.
This is the exact reason why its easier to troubleshoot hard coded vs memory
The ReefAngel.DCPump.Speed and ReefAngel.DCPump.Duration are the key. They are getting their values from internal memory because i did not disable ReefAngel.DCPump.UseMemory.
Those memory locations are set via the portal.
This is the exact reason why its easier to troubleshoot hard coded vs memory
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Ah...got it!
Really thank you. I am going to try to take a stab at putting a timer on the mode..will post a new thread for help shortly..haha.
Really thank you. I am going to try to take a stab at putting a timer on the mode..will post a new thread for help shortly..haha.
Jack
-
- Posts: 21
- Joined: Tue Nov 12, 2013 8:42 pm
- Location: Okinawa
Re: My Jebao "Else" mode
OK I just got my jebao wp-25 and my jebao cable and want to conrol it with the RA. I like the else mode. except its too strong for my tank i think. just kinda blows my feathers all over.
SO what I want to do is have this else mode on during the day 0600-2000 = 45% +/- 15
and else mode at night 2000 - 0600 = 35% +/- 5%
I have reefbreeders LEDs and they have their own controller so i do not have the lights on a schedule so i am not sure which dimming switch to plug the jebao into. or if it matters.
I have port 5 as my extra power head on during the day
and port 6 is where I will plug my jebao into.
here is my wizard drafted code.
I have not added in the else mode code yet cause i dont completely understand how the actinic / daylight section works or the schedule I want.
Thank you in advance
EDIT: I found some other threads with schedules in them and got them working. however I uploaded my code but both my dimming channels are at 0% right now even though it should be on else mode.
ideas?
SO what I want to do is have this else mode on during the day 0600-2000 = 45% +/- 15
and else mode at night 2000 - 0600 = 35% +/- 5%
I have reefbreeders LEDs and they have their own controller so i do not have the lights on a schedule so i am not sure which dimming switch to plug the jebao into. or if it matters.
I have port 5 as my extra power head on during the day
and port 6 is where I will plug my jebao into.
here is my wizard drafted code.
I have not added in the else mode code yet cause i dont completely understand how the actinic / daylight section works or the schedule I want.
Thank you in advance
EDIT: I found some other threads with schedules in them and got them working. however I uploaded my code but both my dimming channels are at 0% right now even though it should be on else mode.
ideas?
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
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port4Bit;
// 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 );
// 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( Port2 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,771,775 );
ReefAngel.StandardLights( Port4,20,0,8,0 );
ReefAngel.Relay.Set( Port5, !ReefAngel.Relay.Status( Port4 ) );
ReefAngel.StandardFan( Port8,775,780 );
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.SetMode( ShortPulse,40,30 );
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = Sync;
////// Place your custom code below here
if (ReefAngel.DCPump.Mode==Custom)
{
if ( (now()%SECS_PER_DAY >= 28800) || (now()%SECS_PER_DAY<= 72000) ) //0800-2000
{
ReefAngel.PWM.SetActinic( ElseMode(45,15,true)); //
}
else if ( (now()%SECS_PER_DAY >= 72000) && (now()%SECS_PER_DAY<= 28800) )
{
ReefAngel.PWM.SetActinic( ElseMode(35,5,true)); // Else on sync mode, 36 +/- 6%
}
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "iratefrizz" );
ReefAngel.ShowInterface();
}
byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
{
// Static's only initialize the first time they are called
static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
static int Delay = random( 500, 3000); // Set the initial delay
static int NewSpeed = MidPoint; // Set the initial speed
static int AntiSpeed = MidPoint; // Set the initial anti sync speed
if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
{
Delay=random(500,5000); // If so, come up with a new delay
int ChangeUp = random(Offset); // Amount to go up or down
if (random(100)<50) // 50/50 chance of speed going up or going down
{
NewSpeed = MidPoint - ChangeUp;
AntiSpeed = MidPoint + ChangeUp;
}
else
{
NewSpeed = MidPoint + ChangeUp;
AntiSpeed = MidPoint - ChangeUp;
}
LastChange=millis(); // Reset the time of the last change
}
if (WaveSync)
{
return NewSpeed;
}
else
{
return AntiSpeed;
}
}
Last edited by iratefrizz on Sun Jun 08, 2014 6:03 am, edited 1 time in total.
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
You don't have to plug your jebao into any of the outlets in the relay at all so you can save those for better use. Just plugging them into either the daylight (which is what your code says) or actinic is enough to control them. I have mine in the actinic just because it's where I plugged it in initially.iratefrizz wrote:OK I just got my jebao wp-25 and my jebao cable and want to conrol it with the RA. I like the else mode. except its too strong for my tank i think. just kinda blows my feathers all over.
SO what I want to do is have this else mode on during the day 0600-2000 = 45% +/- 15
and else mode at night 2000 - 0600 = 35% +/- 5%
I have reefbreeders LEDs and they have their own controller so i do not have the lights on a schedule so i am not sure which dimming switch to plug the jebao into. or if it matters.
I have port 5 as my extra power head on during the day
and port 6 is where I will plug my jebao into.
here is my wizard drafted code.
I have not added in the else mode code yet cause i dont completely understand how the actinic / daylight section works or the schedule I want.
Thank you in advance
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 ReefAngel.Use2014Screen(); // Let's use 2014 Screen // Ports toggled in Feeding Mode ReefAngel.FeedingModePorts = Port1Bit | Port3Bit | Port7Bit | Port6Bit | Port7Bit | Port8Bit; // Ports toggled in Water Change Mode ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port7Bit | Port8Bit; // Ports toggled when Lights On / Off menu entry selected ReefAngel.LightsOnPorts = Port4Bit; // Ports turned off when Overheat temperature exceeded ReefAngel.OverheatShutoffPorts = Port4Bit | Port2Bit; // 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 ); // 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( Port2 ); ReefAngel.Relay.On( Port6 ); ReefAngel.Relay.On( Port7 ); ////// Place additional initialization code below here ////// Place additional initialization code above here } void loop() { ReefAngel.StandardHeater( Port3,771,775 ); ReefAngel.StandardLights( Port4,20,0,8,0 ); ReefAngel.StandardLights( Port5,8,0,20,0 ); ReefAngel.StandardFan( Port8,775,780 ); ReefAngel.DCPump.UseMemory = false; ReefAngel.DCPump.SetMode( ShortPulse,50,10 ); ReefAngel.DCPump.DaylightChannel = Sync; ReefAngel.DCPump.ActinicChannel = None; ////// Place your custom code below here ////// Place your custom code above here // This should always be the last line ReefAngel.Portal( "iratefrizz" ); ReefAngel.ShowInterface(); }
This may help you w/ the scheduling and the speed:
http://forum.reefangel.com/viewtopic.ph ... 5&start=30
See the complete code in my signature for reference too.
Jack
-
- Posts: 21
- Joined: Tue Nov 12, 2013 8:42 pm
- Location: Okinawa
Re: My Jebao "Else" mode
Jack,
Thank you for the reply. that is actually the thread that I pulled my jebao code from should have given credit but I forgot. I might have missed something. but that is the code that Lee had posted for you towards the end... but with my time of day and using else mode isntead of steady.
I didn't think it needed to be plugged into the box but idk what else to plug in there lol. i have lights fuge light heater fan extra powerhead skimmer and return pump
Thank you for the reply. that is actually the thread that I pulled my jebao code from should have given credit but I forgot. I might have missed something. but that is the code that Lee had posted for you towards the end... but with my time of day and using else mode isntead of steady.
I didn't think it needed to be plugged into the box but idk what else to plug in there lol. i have lights fuge light heater fan extra powerhead skimmer and return pump
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
I see a couple of issues (and maybe Lee or Roberto can chime in).
First, I think you need to eliminate this line:
You're giving the controller conflicting information. You want else mode, not short pulse.
Second, (this is the one I am not 100% sure on) is to have 2 different settings in else mode, you need to hard code it in. I only have 1 setting when in else mode so I can control that pump settings via the portal. I don't believe you can with your situation. This also means you can't control your else mode pumps via portal on the fly (which I assume is okay). You need to change this:
This this:
Changing that means that the controller will take the speed given to it via the code and not from the portal.
And eliminate this:
Lee/Roberto or anyone else, is there a better way to do what he wants w/o eliminating control via portal for other pump settings? Hopefully we can get some experts to chime in as I am far from one.
First, I think you need to eliminate this line:
Code: Select all
ReefAngel.DCPump.SetMode( ShortPulse,40,30 );
Second, (this is the one I am not 100% sure on) is to have 2 different settings in else mode, you need to hard code it in. I only have 1 setting when in else mode so I can control that pump settings via the portal. I don't believe you can with your situation. This also means you can't control your else mode pumps via portal on the fly (which I assume is okay). You need to change this:
Code: Select all
ReefAngel.DCPump.UseMemory = true;
Code: Select all
ReefAngel.DCPump.UseMemory = false;
And eliminate this:
Code: Select all
if (ReefAngel.DCPump.Mode==Custom)
Jack
Re: My Jebao "Else" mode
I'm actually waaaay behind on this stuff. I took down the tank I had set up for Jaebo control and haven't implemented it on my new tank. It's on my list to do as soon as I can get an expansion hub, dimming module, and some Jaebo cables.
Try this. It completely eliminates portal control of the pumps but should do what you want.
Try this. It completely eliminates portal control of the pumps but should do what you want.
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
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port3Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port4Bit;
// 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 );
// 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( Port2 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,771,775 );
ReefAngel.StandardLights( Port4,20,0,8,0 );
ReefAngel.Relay.Set( Port5, !ReefAngel.Relay.Status( Port4 ) );
ReefAngel.StandardFan( Port8,775,780 );
////// Place your custom code below here
if (hour() >= 8 && hour() < 20)
{
ReefAngel.PWM.SetActinic( ElseMode(45,15,true));
}
else
{
ReefAngel.PWM.SetActinic( ElseMode(35,5,true));
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "iratefrizz" );
ReefAngel.ShowInterface();
}
byte ElseMode( byte MidPoint, byte Offset, boolean WaveSync )
{
// Static's only initialize the first time they are called
static unsigned long LastChange=millis(); // Set the inital time that the last change occurred
static int Delay = random( 500, 3000); // Set the initial delay
static int NewSpeed = MidPoint; // Set the initial speed
static int AntiSpeed = MidPoint; // Set the initial anti sync speed
if ((millis()-LastChange) > Delay) // Check if the delay has elapsed
{
Delay=random(500,5000); // If so, come up with a new delay
int ChangeUp = random(Offset); // Amount to go up or down
if (random(100)<50) // 50/50 chance of speed going up or going down
{
NewSpeed = MidPoint - ChangeUp;
AntiSpeed = MidPoint + ChangeUp;
}
else
{
NewSpeed = MidPoint + ChangeUp;
AntiSpeed = MidPoint - ChangeUp;
}
LastChange=millis(); // Reset the time of the last change
}
if (WaveSync)
{
return NewSpeed;
}
else
{
return AntiSpeed;
}
}
Re: My Jebao "Else" mode
I'm not sure I follow the questions... sorry this is a long thread.
The code I gave Jack should have been good. It allows portal to work and have the custom else mode. Can you please elaborate and point me to the code and the issue.
Thanks,
Lee
The code I gave Jack should have been good. It allows portal to work and have the custom else mode. Can you please elaborate and point me to the code and the issue.
Thanks,
Lee
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
Lee the issue I see is that he wants 2 different speed settings based on 2 time frame's in else mode. Cosmith's code I think will work but it will prevent him from using the portal to change pump wave patterns.
Jack
Re: My Jebao "Else" mode
That shouldnt be an issue if he uses your base code... Just need another time based if block inside the if CUSTOM mode.
Can you point me to the code again that was initially presented? Sorry for the lazy mode...
Can you point me to the code again that was initially presented? Sorry for the lazy mode...
Re: My Jebao "Else" mode
That shouldnt be an issue if he uses your base code... Just need another time based if block inside the if CUSTOM mode.
Can you point me to the code again that was initially presented? Sorry for the lazy mode...
Can you point me to the code again that was initially presented? Sorry for the lazy mode...
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
I believe this is his code:
I think this is leftover from the wizard probably and should be deleted:
Maybe the above was the only issue?
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
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port3Bit | Port7Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port4Bit | Port2Bit;
// 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 );
// 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( Port2 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port3,771,775 );
ReefAngel.StandardLights( Port4,20,0,8,0 );
ReefAngel.StandardLights( Port5,8,0,20,0 );
ReefAngel.StandardFan( Port8,775,780 );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( ShortPulse,50,10 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = None;
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "iratefrizz" );
ReefAngel.ShowInterface();
}
Code: Select all
ReefAngel.DCPump.SetMode( ShortPulse,40,30 );
Jack
Re: My Jebao "Else" mode
I think so, but I'm not sure. It really shouldn't make a difference because he had UseMemory=true and then if his memory is set to custom mode then it should do nothing while the PWM commands should have taken affect. I'm not sure.
-
- Posts: 21
- Joined: Tue Nov 12, 2013 8:42 pm
- Location: Okinawa
Re: My Jebao "Else" mode
hey guys, sorry I haven't been keeping up. the pulse mode was leftover from the wizard.
how exactly do i turn it on custom?
I would like to control it via portal if someone could tell me how but if not its no different than it is now. as I do not control it via portal now.
how exactly do i turn it on custom?
I would like to control it via portal if someone could tell me how but if not its no different than it is now. as I do not control it via portal now.
-
- Posts: 245
- Joined: Tue Jan 28, 2014 11:10 am
- Location: Northern VA
Re: My Jebao "Else" mode
I assume you have the wifi module? Go to the portal and then internal memory and then dcpumps. Choose custom there. See what happens.iratefrizz wrote:hey guys, sorry I haven't been keeping up. the pulse mode was leftover from the wizard.
how exactly do i turn it on custom?
I would like to control it via portal if someone could tell me how but if not its no different than it is now. as I do not control it via portal now.
Jack
-
- Posts: 21
- Joined: Tue Nov 12, 2013 8:42 pm
- Location: Okinawa
Re: My Jebao "Else" mode
ok, I will try that tonight. I have to reste my router as I think my port forwarding has messed up. I can't acccess my
RA from phone (outside of personal network) OR from Portal website.
(Edit) finally figured out what I was messing up on port forwarding and causing issues with portal. I set the dcpump to custom.
under pumps it says 255% for duration of 255.
so there must be an issue. I will try and reload the most recent suggested code to see if that works.
Thank you again for assistance
RA from phone (outside of personal network) OR from Portal website.
(Edit) finally figured out what I was messing up on port forwarding and causing issues with portal. I set the dcpump to custom.
under pumps it says 255% for duration of 255.
so there must be an issue. I will try and reload the most recent suggested code to see if that works.
Thank you again for assistance