Page 1 of 1
PWM Slope Override
Posted: Mon Nov 11, 2013 8:45 am
by gomer23
I wasn't sure where to post this, I know I saw some references on here about this but wasn't sure if it was implemented yet. What I am looking to do is to have the ability to change the percentage of the PWM for the LEDs on the fly. Or atleast go to 100% if the slope was in the middle of ramping up or down for the day. Its not a big deal but just wondering if this function is available.
Thanks for all the hard work!
Re: PWM Slope Override
Posted: Mon Nov 11, 2013 9:28 am
by rimai
What channels are you using and do you have the android app?
Re: PWM Slope Override
Posted: Mon Nov 11, 2013 9:48 am
by gomer23
Sorry, I am using just the 2 channels that come with the relay box (no expansion) and Yes I have the android app (and love it!)
Thanks, let me know if you need any more information. Here is my current sketch.
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 <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 = Port3Bit | Port5Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port8 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DayLights( Port1 );
ReefAngel.StandardLights(Port2,21,0,0,0);
ReefAngel.StandardHeater( Port6 );
ReefAngel.StandardATO( Port7 );
ReefAngel.PWM.DaylightPWMSlope();
ReefAngel.PWM.ActinicPWMSlope();
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "gomer23" );
ReefAngel.ShowInterface();
}
Re: PWM Slope Override
Posted: Thu Nov 14, 2013 2:48 pm
by gomer23
Any update with this? Just wanted to check in to see if you needed any other information from me. If this is something that isn't possible yet then thats fine I had seen some references to this function and didn't know if this was possible yet. Thanks!
Re: PWM Slope Override
Posted: Thu Nov 14, 2013 10:58 pm
by rimai
If you override port1, both channels will be overridden to internal memory setting Actinic PWM Value and Daylight PWM Value
Re: PWM Slope Override
Posted: Thu Nov 21, 2013 3:22 pm
by gomer23
Oh ok that makes sense then.
On a side note then, at some point would it be possible to have a slider or even just fields on the main screen to change the PWM percentage on the fly. Would be nice for fine tuning color temps and such. Again just a thought at this point. Thanks for your reply!
Re: PWM Slope Override
Posted: Thu Nov 21, 2013 3:27 pm
by rimai
Yeah, the override feature has been added to the libraries. Let's wait for Curt to make use of it in the android app

You can also try the new web ui.
Go to
http://ipaddress:2000/wifi
There is an incompatibility with Chrome at the moment and it will fail to retrieve data after a while, but it should be good enough for you to try it.
Re: PWM Slope Override
Posted: Thu Nov 21, 2013 6:18 pm
by binder
I have started on a new layout/look for the android app. then I have to finish with several things for the pwm override data storage.
Sent from my Moto X