Proofreading Jebao on ATO.....

Do you have a question on how to do something.
Ask in here.
User avatar
Posts: 61
Joined: Sun Jun 08, 2014 12:55 pm
Location: Firestone
PostPosted: Sun Aug 24, 2014 4:43 pm
lnevo wrote:Pretty straight forward like you said.

2 things to verify that you did download the dev tree and also make sure you restart arduino.


Reinstalled Arduino - Reef Angel Controller. Downloaded the dev tree. Replaced the contents of the "libraries" folder with the contents of "libraries-dev"- no change. Closed arduino, restored the original libraries folder, and then overwrote the folders that were different in the libraries - no change.

Is there something I am not adding up top in the code somewhere?

Anyway. It works as it is now. I would like to understand what is going on now to help prevent future issues. LMK. Thank you,

Dan
.....Your forefathers wisely set aside their compassion - Steeled themselves for what needed to be done.......
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Aug 24, 2014 4:45 pm
Can you post the code you attempted to compile?
User avatar
Posts: 61
Joined: Sun Jun 08, 2014 12:55 pm
Location: Firestone
PostPosted: Sun Aug 24, 2014 6:16 pm
lnevo wrote:Can you post the code you attempted to compile?


Here is the quick throw together code. My current code is in the first post. I feel like it is something stupid I am missing. :?: (I want a bigger monitor, no, make that two bigger monitors.) I do like the fact that my current set up has three different "modes" for different times of day. If you figure out my issue with the libraries, then would you please tell me how to do my different modes your way? The more I learn now the better off I will be.

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.Use2014Screen();  // Let's use 2014 Screen
    // 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( 805 );

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,17,0,17,2 );
    ReefAngel.StandardLights( Port2,19,0,19,1 );
    ReefAngel.StandardLights( Port3,19,2,19,5 );
    ReefAngel.StandardHeater( Port4,773,776 );
    ReefAngel.StandardFan( Port5,781,785 );
    ReefAngel.StandardLights( Port6,9,0,20,0 );
    ReefAngel.StandardLights( Port7,8,30,20,30 );
    ReefAngel.StandardLights( Port8,8,29,20,31 );
    ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,0,90,60,0) );
    ReefAngel.PWM.SetActinic( PWMSlope(8,30,20,30,0,90,60,0) );
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.SetMode( TidalSwell,65,10 );
    ReefAngel.DCPump.DaylightChannel = None;
    ReefAngel.DCPump.ActinicChannel = None;
    ReefAngel.DCPump.LowATOChannel = Sync;
    ReefAngel.DCPump.HighATOChannel = AntiSync;
    ////// Place your custom code below here
   

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

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



Thanks,
GC
.....Your forefathers wisely set aside their compassion - Steeled themselves for what needed to be done.......
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Aug 25, 2014 9:18 am
It compiles fine. Can you please try again and post the error. Make sure you have the right Libraries folder when you're updating... if you look in the file DCPump/DCpump.h within the Libraries folder you should see the Low and High ATO channel defined as bytes.

If you're getting this, you're NOT using the right libraries for sure.

sketch_aug25a.cpp: In function 'void loop()':
sketch_aug25a:85: error: 'class DCPumpClass' has no member named 'LowATOChannel'
sketch_aug25a:86: error: 'class DCPumpClass' has no member named 'HighATOChannel'

It's important the we figure out the issue to make sure there's no issue with the dev libraries... so thanks in advance. Once we get this working we can simplify your code and use the right methodology :) for now, though I'm glad it's working for you.
User avatar
Posts: 61
Joined: Sun Jun 08, 2014 12:55 pm
Location: Firestone
PostPosted: Mon Aug 25, 2014 8:53 pm
lnevo wrote:It compiles fine. Can you please try again and post the error. Make sure you have the right Libraries folder when you're updating... if you look in the file DCPump/DCpump.h within the Libraries folder you should see the Low and High ATO channel defined as bytes.

If you're getting this, you're NOT using the right libraries for sure.

sketch_aug25a.cpp: In function 'void loop()':
sketch_aug25a:85: error: 'class DCPumpClass' has no member named 'LowATOChannel'
sketch_aug25a:86: error: 'class DCPumpClass' has no member named 'HighATOChannel'

It's important the we figure out the issue to make sure there's no issue with the dev libraries... so thanks in advance. Once we get this working we can simplify your code and use the right methodology :) for now, though I'm glad it's working for you.



That is the error it generates when I hit verify. I went back and downloaded the dev libraries again. It unzips and saves in downloads folder as "Libraries-dev", so I think I am downloading the right files. I deleted the "Libraries" folder from Computer/Local Disk(C)/Program Files(x86)/Reef Angel Controller, and put the "Libraries-dev" folder in its place. No change. Changed the folder name from "Libraries-dev" to just "Libraries", closed Arduino, restarted it, and - wait for it - No change. Dang it.
When I open the DCPump header file I see:
header file.jpg
header file.jpg (145.22 KiB) Viewed 1353 times


Let me know what you want me to try next. Different computer maybe? Is there a supporting library I need to check?Already reinstalled Arduino - Reef Angel Controller twice. Restarted computer multiple times, restarted Arduino between each try.

Thank You,
Dan
GC
.....Your forefathers wisely set aside their compassion - Steeled themselves for what needed to be done.......

Posts: 12306
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Aug 25, 2014 9:05 pm
Ahhh.
You are placing the files in the wrong spot.
Here is what you will need to do to fix it:
Reinstall Arduino - Reef Angel Controller to place the original libraries folder back.
Move the dev libraries folder into Documents\Arduino\libraries.
Roberto.
User avatar
Posts: 61
Joined: Sun Jun 08, 2014 12:55 pm
Location: Firestone
PostPosted: Tue Aug 26, 2014 7:06 pm
rimai wrote:Ahhh.
You are placing the files in the wrong spot.
Here is what you will need to do to fix it:
Reinstall Arduino - Reef Angel Controller to place the original libraries folder back.
Move the dev libraries folder into Documents\Arduino\libraries.


lnevo wrote:You want to change the branch to dev and then on the bottom right you can download the zip file.

Unzip it and replace the libraries folder with whats inside


I was just doing what it says! :oops: Glad that was an easy fix. Two folders-same name. Leave it to me to find the monkey trap.

Anyway. Thanks for lurking, Roberto.

Now. This young grasshopper would love to continue his lesson on multiple wave settings the "easy way". lnevo, please continue. I'm going to stare at Colin's else mode for a little while, maybe figure it out. :lol: (Yeah, right.)

Thank you,
Dan
.....Your forefathers wisely set aside their compassion - Steeled themselves for what needed to be done.......
User avatar
Posts: 5362
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue Aug 26, 2014 8:57 pm
Here you go. only the relevant code is displayed.

Code: Select all
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.LowATOChannel = Sync;
    ReefAngel.DCPump.HighATOChannel = AntiSync;
    ReefAngel.DCPump.Threshold = 32;
   
    ////// Place your custom code below here
   
   
if (hour()>=9 && hour()<17)
{
    ReefAngel.DCPump.SetMode(LongPulse,60,8);
}
else if (hour()>=17 && hour()<18)
{
    ReefAngel.DCPump.SetMode(NutrientTransport,75,50);
}
else if (hour()>=18 && hour()<9)
{
    ReefAngel.DCPump.SetMode(LongPulse,40,12);
}



You no longer need to set the low speed to 32 anymore since the dev libraries now have a threshold you can set on the pumps. You'll see I defined that right after setting the pump channels. After that it was just a matter of setting the speed and duration based on what you had before. One call to SetMode takes care of everything :)
User avatar
Posts: 61
Joined: Sun Jun 08, 2014 12:55 pm
Location: Firestone
PostPosted: Wed Aug 27, 2014 6:40 pm
Thank you. Not too much different, just getting rid of all the "instruction" in the custom area and let "SetMode" do its thing.

Okay, so what would it take to get the pumps to go nuts during a lightning storm, and then go back when done.

Is it as easy as:

if CheckCloud() // I'm not sure on the terminology, just an example.
{
ReefAngel.DCPump.SetMode (BatShipCrazy,90,5) // I know it's not a real mode (yet), you know what I mean!
}
else if (hour.....blah blah blah and so on.

Just would be nice to make it randomly go nuts with the lightning storms - you know.


Thank you,
GC
.....Your forefathers wisely set aside their compassion - Steeled themselves for what needed to be done.......

Posts: 173
Joined: Fri Dec 26, 2014 6:38 pm
PostPosted: Sun Jan 01, 2017 1:18 pm
happy new year

Im having a similar problem as the original post except it just the antisync pump running full throttle and doesn't respond to commands such as feeding mode?

Code: Select all
void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port5Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port5Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=0;
    ReefAngel.DCPump.WaterChangeSpeed=0;
   
 

    // Ports that are always on
    ReefAngel.Relay.On( Port4 );

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

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

void loop()
{
    ReefAngel.ActinicLights( Port1 );
    ReefAngel.DayLights( Port2 );
    ReefAngel.StandardHeater( Port3 );
    //ReefAngel.StandardLights( Port4, 19,0,7,0); //Skimmer, Reactor 7pm-7am
    ReefAngel.StandardLights( Port5 );
    ReefAngel.DosingPumpRepeat1( Port6 );
    ReefAngel.DosingPumpRepeat2( Port7 );
    ReefAngel.DosingPumpRepeat3( Port8 );
    ReefAngel.PWM.DaylightPWMParabola();
    ReefAngel.PWM.ActinicPWMParabola();
    ReefAngel.DCPump.UseMemory = false;
    ReefAngel.DCPump.LowATOChannel = Sync; // WP40
    ReefAngel.DCPump.HighATOChannel = AntiSync; // SW 8
    ReefAngel.DCPump.AntiSyncOffset = 110; // % (0-255) of main pump (Sync)

    ////// Place your custom code below here
   
    // koralia 1150
    // if (hour()>=23 || hour()<11) ReefAngel.Relay.Off( Port5 );
    // else ReefAngel.WavemakerRandom( Port5, 120, 1800 );
   
    // DC pumps
    // To run this code must choose Custom in portal
    static int rmode;
    static boolean changeMode=true;

    // These are the modes we can cycle through. You can add more and even repeat...
    byte modes[] = { ReefCrest, Lagoon, TidalSwell, ShortPulse, Sine, LongPulse, Else, Gyre, NutrientTransport };

    if (now()%3600==0 || changeMode==true) { // Change every 60 mins (3600seconds) or controller reboot
    rmode=random(100)%sizeof(modes); // Change the mode by picking from our array
    changeMode=false;
    }

    // Set timer when in feeding mode
    static unsigned long feeding;
    if (ReefAngel.DisplayedMenu==FEEDING_MODE) feeding=now();
    // Continue NutrientTranspot Mode for 30 minutes after feeding
    if (now()-feeding<1800) {
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=NutrientTransport;
    // Night mode (go to 30%)
    } else if (now()%SECS_PER_DAY<39600 || now()%SECS_PER_DAY>=82800) { // 11pm to 11am
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=Gyre;
    ReefAngel.DCPump.Speed=30;
    } else if (InternalMemory.DCPumpMode_read()==11) {
    // Custom Mode and nothing else going on
    ReefAngel.DCPump.UseMemory=false;
    ReefAngel.DCPump.Duration=InternalMemory.DCPumpDuration_read();
    ReefAngel.DCPump.Mode=modes[rmode]; // Put the mode to the random mode :)
    ReefAngel.DCPump.Speed=InternalMemory.DCPumpSpeed_read(); // Set speed from portal
    } else {
    ReefAngel.DCPump.UseMemory=true; // Will reset all values from memory
    }


already changed this line based on the info above:

ReefAngel.DCPump.UseMemory = true;

to:

ReefAngel.DCPump.UseMemory = false;

thanks
Image
PreviousNext

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 4 guests

cron