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 »

rimai wrote:So, do we have the first person reporting RA controlling Jebao pump ??? :mrgreen:
Roger that!
Only with you guys holding my hand!
Image
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post by Paulturner911 »

lnevo wrote:What memory location are you trying to change that isn't working and you need to reboot?
Both 220&221 would not reflect the change last night.
I am currently working with 220 (PWMDaytime). I am now up to 70% its running nice. Im not sure I want to go more :) but ofcourse i will! Yeah, Just pushed it to 100. Its a nice pump! no water on my floor, crazy flow in the tank! Ill prob run it around 50 with a 30ish duration! sweet thing is I should be able to tune it up via the portal (once I tie the modes in) correct? Lee did reefcrest for an example, I think I get what I should do:

Portal-Internal Memory-RF-Tidal Wave/ strength 50/ duration 30
NOW this goes AFTER LAST }

//Tidal Swell
byte TidalSwellMode(byte WaveMaxSpeed, boolean PulseSync)
{
static unsigned long lastwavemillis=millis();
static byte WavePhase=0;
static time_t WaveStart=0;
static byte speed=0;
static byte anti_speed=0;

if (WavePhase==0)
{
WavePhase++;
WaveStart=now();
}
else if (WavePhase==1)
{
if (now()-WaveStart>900) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,0,900,0,90))))/10;
speed+=WaveMaxSpeed/2;

anti_speed=(WaveMaxSpeed*2*sin(radians(map(now()-WaveStart,0,900,0,90))))/5;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==2)
{
if (now()-WaveStart>1800) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,900,1800,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=WaveMaxSpeed/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,900,1800,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/4;

}
else if (WavePhase==3)
{
if (now()-WaveStart>2700) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,1800,2700,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=WaveMaxSpeed/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,1800,2700,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/4;
}
else if (WavePhase==4)
{
if (now()-WaveStart>3600) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,2700,3600,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*3)/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,2700,3600,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=(WaveMaxSpeed*3)/20;
}
else if (WavePhase==5)
{
if (now()-WaveStart>4500) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,3600,4500,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*3)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,3600,4500,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=(WaveMaxSpeed*3)/20;
}
else if (WavePhase==6)
{
if (now()-WaveStart>5400) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,4500,5400,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*5)/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,4500,5400,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/20;
}
else if (WavePhase==7)
{
if (now()-WaveStart>6300) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,5400,6300,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*5)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,5400,6300,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/20;
}
else if (WavePhase==8)
{
if (now()-WaveStart>7200) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,6300,7200,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*7)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,6300,7200,90,180))))/10;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==9)
{
if (now()-WaveStart>8100) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,7200,8100,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*7)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,7200,8100,0,90))))/2;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==10)
{
if (now()-WaveStart>9000) WavePhase=0;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,8100,9000,90,180))))/2;
speed+=WaveMaxSpeed/2;

anti_speed=speed;
}

if (PulseSync)
return speed;
else
return anti_speed;
}


THEN THIS GOES IN VOID LOOP
//Tidal Swell
int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

if (mode=Tidal Swell) {
ReefAngel.PWM.SetDaylight( TidalSwellMode(speed,duration) );
} else if (mode=...
...
}

Is that remotely close???
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: JEBO WP-40

Post by rimai »

If you don't code the ap/dp channels to pull settings from the memory, it will only change on reboot because it reads those memory settings as default settings.
That's why you have to reboot the controller everytime.
Add this to your loop():

Code: Select all

ReefAngel.PWM.SetActinic(InternalMemory.LEDPWMActinic_read());
ReefAngel.PWM.SetDaylight(InternalMemory.LEDPWMDaylight_read());
Roberto.
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post by Piper »

rimai wrote:So, do we have the first person reporting RA controlling Jebao pump ??? :mrgreen:
#2 here! Have it running opposite my MP-10 with both pumps using the wave patters from the other thread.

~Charlie
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: JEBO WP-40

Post by rimai »

Cool!!
Are those functions working as intended???
I already added them to the libraries, but wanted to confirm they are working before I release.
Roberto.
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post by Paulturner911 »

Got it! Ive added it to my code Im compiling for the next upload.

Can anyone confirm if my "guess" on how to code the RF/Portal was going to work as intended? I dont want to do all 7 and find that Im COMPLETELY wrong :)
Image
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: JEBO WP-40

Post by Piper »

rimai wrote:Cool!!
Are those functions working as intended???
I already added them to the libraries, but wanted to confirm they are working before I release.
So far, yes. I was saving the output for each pump in a customer var for the last 4 or 5 days now. I got some weird numbers at first (130% - 550%) but I think it had to do with the way I was assigning the variables. I made a couple of changes and it seems to have a normal output now.

I plan on getting it to work utilizing internal memory this weekend so I can adjust it form one of the various apps. (Although, maybe using the Vortech modes like Lee suggested would work better. Hadn't though about it like that.) I'll take a closer look at all the various patterns this weekend after I do that.

~Charlie
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

JEBO WP-40

Post by lnevo »

Paulturner911 wrote:Got it! Ive added it to my code Im compiling for the next upload.

Can anyone confirm if my "guess" on how to code the RF/Portal was going to work as intended? I dont want to do all 7 and find that Im COMPLETELY wrong :)
You are close. But you will need to use numerical values for mode or the defined nickname in Globals.h. Also, i would pass duration%2 which would change whatever duration is set to either 0/1 for even/odd numbers since the second arg in Tidal Swell is a boolean.

But looks like you have the idea.
Paulturner911
Posts: 287
Joined: Wed Jan 23, 2013 12:36 pm

Re: JEBO WP-40

Post by Paulturner911 »

lnevo wrote:
Paulturner911 wrote:Got it! Ive added it to my code Im compiling for the next upload.

Can anyone confirm if my "guess" on how to code the RF/Portal was going to work as intended? I dont want to do all 7 and find that Im COMPLETELY wrong :)
You are close. But you will need to use numerical values for mode or the defined nickname in Globals.h. Also, i would pass duration%2 which would change whatever duration is set to either 0/1 for even/odd numbers since the second arg in Tidal Swell is a boolean.

But looks like you have the idea.
I dont.... All I do is ask, ask and ask again. Could you modify the code I posted to be correct so that I could then take the changes and make them to the other codes?
Also do I add this to feedmode toggles | LEDPWMDaylight |?? its not blue so its not right

Thanks, Im just trying to get this dialed in before POKER NIGHT!!
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: JEBO WP-40

Post by lnevo »

Here you go.

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


// Ports that are always on

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


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

void loop()
{
ReefAngel.Relay.On( Port1 );
ReefAngel.StandardFan( Port2 );
ReefAngel.ActinicLights( Port3 );
ReefAngel.WavemakerRandom1( Port5,180,900 );
ReefAngel.WavemakerRandom2( Port6,90,900 );
ReefAngel.DayLights( Port7 );
ReefAngel.DayLights( Port8 );
//Moonlight Phase 9pm-10am (CH4-CH5)
if ( (hour() >=10) && (hour() <21) )
ReefAngel.PWM.SetChannel( 4,(0) );
else
ReefAngel.PWM.SetChannel( 4, MoonPhase() );
if ( (hour() >=10) && (hour() <21) )
ReefAngel.PWM.SetChannel( 5,(0) );
else
ReefAngel.PWM.SetChannel( 5, MoonPhase() );
//Pump Delay and Over Flow Protection
if (ReefAngel.HighATO.IsActive())
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.Off(Port1);
//ATO Protection
if (ReefAngel.LowATO.IsActive())
ReefAngel.Relay.On(Port4);
else
ReefAngel.Relay.Off(Port4);
//Kalk Dose 20sec @ 8pm-12pm (every 15min)
if (hour() >=20 || hour() < 12)
ReefAngel.Relay.Set(Port4, now()%900<22);
else
ReefAngel.Relay.Off(Port4);
//Feed Mode Delay on Pump
static boolean feeding=false;
static unsigned long feedingstarted = now();
if (ReefAngel.DisplayedMenu==FEEDING_MODE)
{
if (!feeding)
{
feeding=true;
feedingstarted = now();
}
else
{
if (now()-feedingstarted>900)
{
bitSet(ReefAngel.Relay.RelayMaskOff,Port5-1);
bitSet(ReefAngel.Relay.RelayMaskOff,Port6-1);
}
}
}


////// Place your custom code below here

/* Reference for possible modes...

#define Constant      0
#define Lagoon            1
#define Random1       1 // Lagoonal
#define ReefCrest         2
#define Random2       2 // Reef Crest
#define ShortPulse        3
#define ShortWave     3
#define LongPulse         4
#define LongWave      4
#define NutrientTransport       5
#define Smart_NTM     5 // Nutrient Transport Mode
#define TidalSwell        6
#define Smart_TSM     6 // Tidal Swell Mode

*/
// Read memory for RF Wave Settings
int mode=InternalMemory.RFMode_read();
int speed=InternalMemory.RFSpeed_read();
int duration=InternalMemory.RFDuration_read();

if (mode=TidalSwell) {
ReefAngel.PWM.SetDaylight( TidalSwellMode(speed,duration%2) );
} else {
ReefAngel.PWM.SetDaylight( speed / 2 );
}

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

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

void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

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

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

void DrawCustomGraph()
{
}

//Tidal Swell
byte TidalSwellMode(byte WaveMaxSpeed, boolean PulseSync)
{
static unsigned long lastwavemillis=millis();
static byte WavePhase=0;
static time_t WaveStart=0;
static byte speed=0;
static byte anti_speed=0;

if (WavePhase==0)
{
WavePhase++;
WaveStart=now();
}
else if (WavePhase==1)
{
if (now()-WaveStart>900) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,0,900,0,90))))/10;
speed+=WaveMaxSpeed/2;

anti_speed=(WaveMaxSpeed*2*sin(radians(map(now()-WaveStart,0,900,0,90))))/5;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==2)
{
if (now()-WaveStart>1800) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,900,1800,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=WaveMaxSpeed/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,900,1800,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/4;

}
else if (WavePhase==3)
{
if (now()-WaveStart>2700) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,1800,2700,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=WaveMaxSpeed/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,1800,2700,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/4;
}
else if (WavePhase==4)
{
if (now()-WaveStart>3600) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,2700,3600,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*3)/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,2700,3600,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=(WaveMaxSpeed*3)/20;
}
else if (WavePhase==5)
{
if (now()-WaveStart>4500) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,3600,4500,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*3)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,3600,4500,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=(WaveMaxSpeed*3)/20;
}
else if (WavePhase==6)
{
if (now()-WaveStart>5400) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,4500,5400,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*5)/20;

anti_speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,4500,5400,90,180))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/20;
}
else if (WavePhase==7)
{
if (now()-WaveStart>6300) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,5400,6300,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*5)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,5400,6300,0,90))))/20;
anti_speed+=WaveMaxSpeed/2;
anti_speed+=WaveMaxSpeed/20;
}
else if (WavePhase==8)
{
if (now()-WaveStart>7200) WavePhase++;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,6300,7200,90,180))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*7)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,6300,7200,90,180))))/10;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==9)
{
if (now()-WaveStart>8100) WavePhase++;
speed=(WaveMaxSpeed*3*sin(radians(map(now()-WaveStart,7200,8100,0,90))))/20;
speed+=WaveMaxSpeed/2;
speed+=(WaveMaxSpeed*7)/20;

anti_speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,7200,8100,0,90))))/2;
anti_speed+=WaveMaxSpeed/2;
}
else if (WavePhase==10)
{
if (now()-WaveStart>9000) WavePhase=0;
speed=(WaveMaxSpeed*sin(radians(map(now()-WaveStart,8100,9000,90,180))))/2;
speed+=WaveMaxSpeed/2;

anti_speed=speed;
}

if (PulseSync)
return speed;
else
return anti_speed;
}
This gives you TidalSwell mode and I also set the condition that if it's not set to TidalSwell, you'll be at constant speed, but at 50%. Just so you can visibly see the change. Feel free to build your own now. I pasted a comment block with all the RF mode names. You just need to add the function and the condition. Keep in mind some functions require different arguments, so you won't always be able to just pass in duration for anything.
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...
Post Reply