JEBO WP-40

Basic / Standard Reef Angel hardware
Post Reply
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post 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.
Image
jayathome
Posts: 9
Joined: Thu Mar 21, 2013 4:22 am

Re: JEBO WP-40

Post 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?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: JEBO WP-40

Post 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.
Roberto.
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post 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 :)
jayathome
Posts: 9
Joined: Thu Mar 21, 2013 4:22 am

Re: JEBO WP-40

Post by jayathome »

Ok, I ordered the very next day. Darn it. Guess I will just monitor until I get to play next week.
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: JEBO WP-40

Post 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
Roberto.
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post 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 );
}
Image
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post 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 );
}
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

JEBO WP-40

Post by lnevo »

It may not like speed / 2 the way its written. Try commenting it out for now..
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post 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.
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

JEBO WP-40

Post by lnevo »

Yeah ReefCrestMode is the name of the function. The define is just ReefCrest
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post by lnevo »

Your missing this part.

int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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....
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post 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
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

JEBO WP-40

Post 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...
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post by lnevo »

The code you pasted is coming up wrong so I can't modify it easily to put in the code you need....
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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....
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post 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
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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.
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post 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)
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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.
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post 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.
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post 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!!!
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post 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.
Seedlessone
Posts: 132
Joined: Tue Jan 24, 2012 6:20 pm

Re: JEBO WP-40

Post by Seedlessone »

yup...and running at 100%.....
Post Reply