How to enable standard dimming function in Portal ?
-
lmolenmaker
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
How to enable standard dimming function in Portal ?
Hi guys,
Can anybody tell me which piece of code I need in the "setup section" and in the " loop section" in order to enable the standard dimming function in the "portal internal memory section" ?
Thank you so much in advance.
Leslie
Can anybody tell me which piece of code I need in the "setup section" and in the " loop section" in order to enable the standard dimming function in the "portal internal memory section" ?
Thank you so much in advance.
Leslie
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to enable standard dimming function in Portal ?
You dont have to add any code..actually you have to remove code. Show us what your doing for your lights now...
-
lmolenmaker
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: How to enable standard dimming function in Portal ?
Hi Lee,
This is the simple code I have at the moment. Please note that my PWM expansion is on the way and then I would like to add my WP25 to one of the channels and control as well through the portal.
Hope you can help me out.
Leslie
This is the simple code I have at the moment. Please note that my PWM expansion is on the way and then I would like to add my WP25 to one of the channels and control as well through the portal.
Hope you can help me out.
Leslie
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.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// 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 = 0;
// 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;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 500 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// ReefAngel.DCPump.ActinicChannel=Sync; // Now you're pump will be affected by the portal settings.
// Ports that are always on/off
ReefAngel.Relay.Off(Port5);
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardFan( Port1,250,255 );
ReefAngel.StandardLights( Port2,8,0,23,59 );
//ReefAngel.StandardLights( Port3,10,30,22,30 );
ReefAngel.StandardLights( Port4,19,0,19,1 );
ReefAngel.StandardHeater( Port7,245,250 );
ReefAngel.DCPump.UseMemory = false;
//ReefAngel.DCPump.SetMode( ShortPulse,90,165 );
//ReefAngel.DCPump.DaylightChannel = None;
//ReefAngel.DCPump.ActinicChannel = Sync;
////// Place your custom code below here
// ReefAngel.DCPump.UseMemory=true; // Use whatever is in the portal
////////
if (millis() > 1000) // After 1 second
{
if ( (hour() >=18) && (hour() <20) )
ReefAngel.Relay.Off(Port5); // Freshwater ATO off between 18.00 and 20.00, port 5
else
ReefAngel.WaterLevelATO(Port5,30,95,99); // else min level 95% and max level 99%, timeout 30 sec
/////////
if ( (hour() >=18) && (hour() <19) )
ReefAngel.WaterLevelATO(Port6,4000,96,99); // Saltwater ATO on when below 96%, max level 99%, timeout 4000 sec. Port 6 between 18.00 and 19.00
else
ReefAngel.Relay.Off(Port6); // otherwise port 6 off
//////////
ReefAngel.CustomVar[1]=ReefAngel.Relay.Status(Port1); // Fan on email trigger
ReefAngel.CustomVar[4]=ReefAngel.Relay.Status(Port4); // Alk on email trigger
ReefAngel.CustomVar[5]=ReefAngel.Relay.Status(Port5); // Freshwater on email trigger
ReefAngel.CustomVar[7]=255;
///////////
ReefAngel.PWM.SetDaylight( PWMParabola(9,0,21,30,0,30,0) );
ReefAngel.PWM.SetActinic( PWMParabola(8,0,22,45,0,50,0) );
}
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "lmolenmaker" );
ReefAngel.ShowInterface();
}
Last edited by lmolenmaker on Thu Dec 26, 2013 3:16 am, edited 1 time in total.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to enable standard dimming function in Portal ?
ReefAngel.StandardLights(Port4);
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: How to enable standard dimming function in Portal ?
I think we are missing one of the keywords.
Try just adding a comment to force it.
Try just adding a comment to force it.
Code: Select all
\\ReefAngel.PWM.SetChannel
Roberto.
-
lmolenmaker
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: How to enable standard dimming function in Portal ?
Dear Roberto or Lee,
I do not quite understand. If I want to control my Jebao pump (actinic channel) via the portal I need to do the following:
* put ReefAngel.DCPump.ActinicChannel=Sync; in the setup section and
* put ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = Sync
in the loop section. All worked fine.
Now I have taken my pump off line until my expansion is in and I want to control my leds via the portal (blues connected to the actinic and whites to the daylight channel).
So do I need to put something similar in the code sections and if so what code and where?
@Lee Port 4 is a dosing pump I run for 1 minute a day
Port 2 is the power supply for the Leds and the dimming leads are connected to the pwm ports
Hope you guys can help me out here.
Leslie
I do not quite understand. If I want to control my Jebao pump (actinic channel) via the portal I need to do the following:
* put ReefAngel.DCPump.ActinicChannel=Sync; in the setup section and
* put ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = Sync
in the loop section. All worked fine.
Now I have taken my pump off line until my expansion is in and I want to control my leds via the portal (blues connected to the actinic and whites to the daylight channel).
So do I need to put something similar in the code sections and if so what code and where?
@Lee Port 4 is a dosing pump I run for 1 minute a day
Port 2 is the power supply for the Leds and the dimming leads are connected to the pwm ports
Hope you guys can help me out here.
Leslie
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: How to enable standard dimming function in Portal ?
Ahhh.
Now I understand what you want to do.
All you need is this:
An set either Sync or AntiSync to the channel you will be connecting the Jebao pump.
Now I understand what you want to do.
All you need is this:
Code: Select all
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = Sync;
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;
Roberto.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to enable standard dimming function in Portal ?
I think your misunderstanding roberto...
Jaebos are offline..
Leslie wants to control leds now on those ports...
I think?
Jaebos are offline..
Leslie wants to control leds now on those ports...
I think?
-
lmolenmaker
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: How to enable standard dimming function in Portal ?
That's correct Lee.
In the portal's internal memory section there is a tab which says "standard dimming".
I would like to control the leds via that. I just don't want to upload a new code everytime I would like to change the parabola settings.
The code Roberto suggested will help though as soon as my pwm expansion module is in.
I appreciate your help.
Leslie
In the portal's internal memory section there is a tab which says "standard dimming".
I would like to control the leds via that. I just don't want to upload a new code everytime I would like to change the parabola settings.
The code Roberto suggested will help though as soon as my pwm expansion module is in.
I appreciate your help.
Leslie
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: How to enable standard dimming function in Portal ?
Ok...
So here is what you need.
Replace this:
With this:
Then, you will be able to change the parabola settings using the portal.
If you go through the wizard and choose internal memory instead of hard coded settings, it will also generate a code that would use the memory settings that you can change it in the Portal.
So here is what you need.
Replace this:
Code: Select all
ReefAngel.PWM.SetDaylight( PWMParabola(9,0,21,30,0,30,0) );
ReefAngel.PWM.SetActinic( PWMParabola(8,0,22,45,0,50,0) );
Code: Select all
ReefAngel.PWM.DaylightPWMParabola();
ReefAngel.PWM.ActinicPWMParabola();
If you go through the wizard and choose internal memory instead of hard coded settings, it will also generate a code that would use the memory settings that you can change it in the Portal.
Roberto.
-
lmolenmaker
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: How to enable standard dimming function in Portal ?
Thank you.
I will give it a try tonight. I'll let you know the outcome.
You guys are awesome.
Leslie
I will give it a try tonight. I'll let you know the outcome.
You guys are awesome.
Leslie