Page 6 of 14

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 5:14 pm
by Paulturner911
Thanks. Maybe Tidal was not a good one for me to start with. I really just needed the changes with in what I had posted at 5:05. In order to help me identify where I needed the numerical values and the definitions. You DA man. I was also trying to figure what to type in feed mode toggle ports to turn off the PWMDaylight. I tried PWMDaylight, LEDPWMDaylight, PWM.SetDaylight (0)? IDK how else I would do it.

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 5:59 pm
by jayathome
Wow, moving fast here.
Are you guys using the harness or doing your own cables mods?
Also, any idea on when the pre-ordered cables will be ready for delivery?

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 6:15 pm
by lnevo
Paulturner911 wrote:Thanks. Maybe Tidal was not a good one for me to start with. I really just needed the changes with in what I had posted at 5:05. In order to help me identify where I needed the numerical values and the definitions. You DA man. I was also trying to figure what to type in feed mode toggle ports to turn off the PWMDaylight. I tried PWMDaylight, LEDPWMDaylight, PWM.SetDaylight (0)? IDK how else I would do it.
Change this

bitSet(ReefAngel.Relay.RelayMaskOff,Port5-1);
bitSet(ReefAngel.Relay.RelayMaskOff,Port6-1);

To

ReefAngel.PWM.SetDaylight( 0 );

And you could get rid of the tidal swell mode to this

ReefAngel.PWM.SetDaylight( speed );

Then the f loop would switch from full speed to 1/2 speed depending on the mode and you old play with th pump with a constant speed based on the memory setting.

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 7:09 pm
by rimai
jayathome wrote:Wow, moving fast here.
Are you guys using the harness or doing your own cables mods?
Also, any idea on when the pre-ordered cables will be ready for delivery?
Some people got theirs from the initial batch.
The next batch should be shipped early next week.

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 7:35 pm
by Piper
jayathome wrote:Wow, moving fast here.
Are you guys using the harness or doing your own cables mods?
Also, any idea on when the pre-ordered cables will be ready for delivery?
I'm using the harness. I was refreshing the order page for two hours straight waiting for them to show up just to make sure I got in on the initial batch :)

Re: JEBO WP-40

Posted: Fri Mar 29, 2013 8:11 pm
by jayathome
Ok, I ordered the very next day. Darn it. Guess I will just monitor until I get to play next week.

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 7:46 am
by Seedlessone
Okay so I've finally got some time to mess with my cable.

I would lie to start with the reef crest. Is it just as simple as pasting the reef crest mode in the custom code area? I'm assuming then I can adjust from custom memory location?

Can someone post the link to the wave pattern thread. Can't find it.

JEBO WP-40

Posted: Sat Mar 30, 2013 9:43 am
by lnevo

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:50 am
by rimai
Add the wave pattern functions on that post to the end of your code until the next libs get released.
Then to use the wave pattern you want, your code should look like this:

Code: Select all

ReefAngel.PWM.SetActinic ( ReefCrestMode(50,20,true) ); // ReefCrest at 50 +/- 20 in sync mode
ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 11:35 am
by Paulturner911
Im getting invalid conversion error on this

//ReefCrest
if (mode=ReefCrestMode) {
ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
ReefAngel.PWM.SetDaylight( speed / 2 );
}

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 11:45 am
by Piper
Try this:

Code: Select all

//ReefCrest
if (mode == ReefCrestMode) {
  ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
  ReefAngel.PWM.SetDaylight( speed / 2 );
}

JEBO WP-40

Posted: Sat Mar 30, 2013 11:46 am
by lnevo
It may not like speed / 2 the way its written. Try commenting it out for now..

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 11:53 am
by Paulturner911
Piper wrote:Try this:

Code: Select all

//ReefCrest
if (mode == ReefCrestMode) {
  ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
  ReefAngel.PWM.SetDaylight( speed / 2 );
}

Errors
ISO C++ forbids comparison between pointer & integer

//ReefCrest
if (mode == ReefCrest) {
ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
ReefAngel.PWM.SetDaylight( speed / 2 );
}

This works...I removed the word MODE in this line
if (mode == ReefCrestMMode) {

As for the speed/2 Im not sure what it does( I think it runs at 50%) I just pulled it from the tidal swell that Lee was kind enough to provide.

JEBO WP-40

Posted: Sat Mar 30, 2013 1:22 pm
by lnevo
Yeah ReefCrestMode is the name of the function. The define is just ReefCrest

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 6:38 pm
by Seedlessone
Paulturner911 wrote:
Piper wrote:Try this:

Code: Select all

//ReefCrest
if (mode == ReefCrestMode) {
  ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
  ReefAngel.PWM.SetDaylight( speed / 2 );
}

Errors
ISO C++ forbids comparison between pointer & integer

//ReefCrest
if (mode == ReefCrest) {
ReefAngel.PWM.SetDaylight ( ReefCrestMode(50,20,false) ); // ReefCrest at 50 +/- 20 in anti-sync mode
} else {
ReefAngel.PWM.SetDaylight( speed / 2 );
}

This works...I removed the word MODE in this line
if (mode == ReefCrestMMode) {

As for the speed/2 Im not sure what it does( I think it runs at 50%) I just pulled it from the tidal swell that Lee was kind enough to provide.
I tried this an got an error of "mode was not declared in this scope". Any ideas? I pasted this code in the custom code section....

Thanks

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 6:49 pm
by lnevo
Your missing this part.

int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 6:53 pm
by Seedlessone

Code: Select all

[quote]
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <[color=#CC6600]Wire[/color].h>
#include <[color=#CC6600]OneWire[/color].h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <[color=#006699]LED[/color].h>
#include <RA_TempSensor.h>
#include <[color=#006699]Relay[/color].h>
#include <RA_PWM.h>
#include <[color=#006699]Timer[/color].h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <[color=#006699]Salinity[/color].h>
#include <[color=#006699]RF[/color].h>
#include <[color=#006699]IO[/color].h>
#include <[color=#006699]ORP[/color].h>
#include <[color=#006699]AI[/color].h>
#include <[color=#006699]PH[/color].h>
#include <[color=#006699]WaterLevel[/color].h>
#include <[color=#CC6600]ReefAngel[/color].h>

[color=#7E7E7E]////// Place global variable code below here[/color]


[color=#7E7E7E]////// Place global variable code above here[/color]


[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]()
{
    [color=#7E7E7E]// This must be the first line[/color]
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]Init[/color]();  [color=#7E7E7E]//Initialize controller[/color]
    [color=#7E7E7E]// Ports toggled in Feeding Mode[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]FeedingModePorts[/color] = [color=#006699]Port5Bit[/color] | [color=#006699]Port6Bit[/color];
    [color=#7E7E7E]// Ports toggled in Water Change Mode[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]WaterChangePorts[/color] = [color=#006699]Port5Bit[/color] | [color=#006699]Port6Bit[/color] | [color=#006699]Port7Bit[/color] | [color=#006699]Port8Bit[/color];
    [color=#7E7E7E]// Ports toggled when Lights On / Off menu entry selected[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LightsOnPorts[/color] = [color=#006699]Port1Bit[/color];
    [color=#7E7E7E]// Ports turned off when Overheat temperature exceeded[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]OverheatShutoffPorts[/color] = [color=#006699]Port2Bit[/color] | [color=#006699]Port7Bit[/color];
    [color=#7E7E7E]// Use T1 probe as temperature and overheat functions[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]TempProbe[/color] = [color=#006699]T1_PROBE[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]OverheatProbe[/color] = [color=#006699]T1_PROBE[/color];


    [color=#7E7E7E]// Ports that are always on[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port5[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port6[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port8[/color] );

    [color=#7E7E7E]////// Place additional initialization code below here[/color]
    

    [color=#7E7E7E]////// Place additional initialization code above here[/color]
}

[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]()
{
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]DayLights[/color]( [color=#006699]Port1[/color] );
     [color=#CC6600]ReefAngel[/color].[color=#CC6600]ActinicLights[/color]( [color=#006699]Port2[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]Set[/color]( [color=#006699]Port3[/color], ![color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]Status[/color]( [color=#006699]Port1[/color] ) );
      [color=#CC6600]if[/color] ([color=#CC6600]ReefAngel[/color].[color=#006699]HighATO[/color].[color=#CC6600]IsActive[/color]())
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]SingleATOLow[/color]( [color=#006699]Port4[/color] );
  [color=#CC6600]else[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]Off[/color]( [color=#006699]Port4[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]StandardHeater[/color]( [color=#006699]Port7[/color] );
    [color=#7E7E7E]////// Place your custom code below here[/color]
    

    [color=#7E7E7E]////// Place your custom code above here[/color]

    [color=#7E7E7E]// This should always be the last line[/color]
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]Portal[/color]( [color=#006699]"SeedlessOne"[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]ShowInterface[/color]();
}

[color=#CC6600]void[/color] DrawCustomMain()
{
    [color=#CC6600]int[/color] x,y;
    [color=#CC6600]char[/color] text[10];
    [color=#7E7E7E]// Parameters[/color]
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawMonitor[/color]( 15, 20, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color],
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]GetDaylightValue[/color](), [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]GetActinicValue[/color]() );
#else [color=#7E7E7E]// defined DisplayLEDPWM && ! defined RemoveAllLights[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawMonitor[/color]( 15, 20, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color] );
#endif [color=#7E7E7E]// defined DisplayLEDPWM && ! defined RemoveAllLights[/color]
    [color=#CC6600]pingSerial[/color]();

    [color=#7E7E7E]// pH Expansion[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color]( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,66, [color=#006699]"PHE:"[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color]( COLOR_MEDIUMSEAGREEN,DefaultBGColor,39,66, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]PHExp[/color] );
    [color=#CC6600]pingSerial[/color]();

    [color=#7E7E7E]// Water Level[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color]( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, [color=#006699]"WL:"[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color]( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, [color=#CC6600]ReefAngel[/color].[color=#006699]WaterLevel[/color].[color=#CC6600]GetLevel[/color]() );
    [color=#CC6600]pingSerial[/color]();

    [color=#7E7E7E]// Main Relay Box[/color]
    [color=#CC6600]byte[/color] TempRelay = [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayData[/color];
    TempRelay &= [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayMaskOff[/color];
    TempRelay |= [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayMaskOn[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawOutletBox[/color]( 12, 92, TempRelay );
    [color=#CC6600]pingSerial[/color]();

    [color=#7E7E7E]// Date and Time[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawDate[/color]( 6, 122 );
    [color=#CC6600]pingSerial[/color]();
}

[color=#CC6600]void[/color] DrawCustomGraph()
{
}


[/quote]


Can you help me out on this code section or post your code so I can see where exactly you guys are placing this code. I would like to just get this one in reefcrest mode. Thanks for the help....

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 7:26 pm
by lnevo
Take a look at the code here...and try reading the past couple of pages.,, we just did the same
http://forum.reefangel.com/viewtopic.php?p=22903#p22903

Sent from my GT-P31 thing... 13 using Tapatalk 2

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 8:03 pm
by Seedlessone
lnevo wrote:Take a look at the code here...and try reading the past couple of pages.,, we just did the same
http://forum.reefangel.com/viewtopic.php?p=22903#p22903

Sent from my GT-P31 thing... 13 using Tapatalk 2
Sadly I've read that more than once. Still missing something. Back to the chalk board.

JEBO WP-40

Posted: Sat Mar 30, 2013 8:05 pm
by lnevo
Just look where this code is...


int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

This will fix the error you reported...

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 8:14 pm
by lnevo
The code you pasted is coming up wrong so I can't modify it easily to put in the code you need....

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 8:31 pm
by Seedlessone

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 = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.DayLights( Port1 );
     ReefAngel.ActinicLights( Port2 );
    ReefAngel.Relay.Set( Port3, !ReefAngel.Relay.Status( Port1 ) );
      if (ReefAngel.HighATO.IsActive())
    ReefAngel.SingleATOLow( Port4 );
  else
    ReefAngel.Relay.Off( Port4 );
    ReefAngel.StandardHeater( Port7 );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "SeedlessOne" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // pH Expansion
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,66, "PHE:" );
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,39,66, ReefAngel.Params.PHExp );
    pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}


LOL sometimes the RA makes me feel like a complete noob. Own an IT consulting business and consider myself a bright guy but seem to trip all over this coding....

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 8:51 pm
by lnevo

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 = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here


    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.DayLights( Port1 );
     ReefAngel.ActinicLights( Port2 );
    ReefAngel.Relay.Set( Port3, !ReefAngel.Relay.Status( Port1 ) );
      if (ReefAngel.HighATO.IsActive())
    ReefAngel.SingleATOLow( Port4 );
  else
    ReefAngel.Relay.Off( Port4 );
    ReefAngel.StandardHeater( Port7 );
    ////// Place your custom code below here
    
int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

ReefAngel.PWM.SetActinic (ReefCrestMode (speed, duration, true);
ReefAngel.PWM.SetDaylight(ReefCrestMode (speed, duration, false);

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "SeedlessOne" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // pH Expansion
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,66, "PHE:" );
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,39,66, ReefAngel.Params.PHExp );
    pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}

// add the reefcrestmode function here
That should do it.. you just have to add the reefcrestmode fuction at the bottom where I left the comment.

Speed and duration in the vortech mem location should now set your pwm ports to whatecer values you add. The duration value will be the intensity of the mode, amd if you have two pumps they will be in anti sync.


Sent from my GT-P3113 using Tapatalk 2

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:05 pm
by Seedlessone

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 = Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here


    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.DayLights( Port1 );
     ReefAngel.ActinicLights( Port2 );
    ReefAngel.Relay.Set( Port3, !ReefAngel.Relay.Status( Port1 ) );
      if (ReefAngel.HighATO.IsActive())
    ReefAngel.SingleATOLow( Port4 );
  else
    ReefAngel.Relay.Off( Port4 );
    ReefAngel.StandardHeater( Port7 );
    ////// Place your custom code below here
    
int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

ReefAngel.PWM.SetActinic (ReefCrestMode (speed, duration, true);
ReefAngel.PWM.SetDaylight(ReefCrestMode (speed, duration, false);

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.Portal( "SeedlessOne" );
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 20, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // pH Expansion
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,66, "PHE:" );
    ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,39,66, ReefAngel.Params.PHExp );
    pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,66, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,66, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 92, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}

// byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)
{
  static unsigned long lastwavemillis=millis();
  static int newspeed=WaveSpeed;
  if ((millis()-lastwavemillis) > 5000)
  {
    if (random(100)<50) newspeed--; else newspeed++;
    newspeed=constrain(newspeed,WaveSpeed-WaveOffset,WaveSpeed+WaveOffset);
    newspeed=constrain(newspeed,0,100);
    lastwavemillis=millis();
  }  
  if (PulseSync)
    return newspeed;
  else
    return WaveSpeed-(newspeed-WaveSpeed);
}

Reefcrestmode not declared in the scope. If Im doing something extremely dumb, please excuse me.

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:15 pm
by Piper
Almost there! Near the bottom, where you pasted the ReefCrestMode, you need to remove the two slashes. That's commenting out that function.

From this:

Code: Select all

// byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)
To this:

Code: Select all

byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:20 pm
by Seedlessone
Piper wrote:Almost there! Near the bottom, where you pasted the ReefCrestMode, you need to remove the two slashes. That's commenting out that function.

From this:

Code: Select all

// byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)
To this:

Code: Select all

byte ReefCrestMode(byte WaveSpeed, byte WaveOffset, boolean PulseSync)
Already tried taking those out. Received a different error. \

ReefAngel.PWM.SetActinic (ReefCrestMode (speed, duration, true);
Expected before token.

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:30 pm
by Piper

Code: Select all

    ReefAngel.PWM.SetActinic (ReefCrestMode (speed, duration, true));
    ReefAngel.PWM.SetDaylight(ReefCrestMode (speed, duration, false));
Missing the last ) at the end of those lines.

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 9:40 pm
by Seedlessone
Getting much closer. Uploaded just fine to my controller this time. Pump seems to just be running at a constant speed right now though.

Thanks for all the help so far everyone!!!

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 10:01 pm
by Piper
Does your display show you the PWM speed? That should tell you what speed your pump is running at. If you watch it you can see if the speed adjusts at all.

Re: JEBO WP-40

Posted: Sat Mar 30, 2013 10:05 pm
by Seedlessone
yup...and running at 100%.....