This is what I used to generate the plot:
Code: Select all
PWMSigmoid(8,0,20,0,0,100,0)
https://github.com/reefangel/Libraries/issues/194
Code: Select all
PWMSigmoid(8,0,20,0,0,100,0)
Code: Select all
if ((current >= (start + FWHM)) && (current < (end - FWHM)))
Code: Select all
#include <Salinity.h>
#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 <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init();
setSyncInterval(SECS_PER_HOUR*6000);
delay(500);
wdt_reset();
delay(500);
wdt_reset();
delay(500);
wdt_reset();
delay(500);
wdt_reset();
delay(500);
wdt_reset();
delay(500);
wdt_reset();
}
//ReefAngel.PWM.
void loop()
{
while(1)
{
wdt_reset();
Serial.println(PWMSigmoid(8,0,20,0,0,100,0));
adjustTime(60);
delay(1);
}
ReefAngel.ShowInterface();
}
The only thing I would worry about that is the dosing pumps, how quick do you run through the 24 hour window? I think a simple flag to not run the dosing pumps during the preview would suffice...rimai wrote:The only caveat is that all other functions that use time would be affected too.