auto-feed

Do you have a question on how to do something.
Ask in here.
Post Reply
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

Thanks guys for taking time on this.
Curt, i don't use a wavemaker so I'm OK, how do i setup with the use of serial monitor, looks like i have to used a command here.
also i am looking at the pde code, do i have to add a value or is there going to be a user menu that can be edited, do i have to upload auto_feed.pde before vacation?..totally nob on coding :)


Thanks.
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

acabano wrote:Thanks guys for taking time on this.
Curt, i don't use a wavemaker so I'm OK, how do i setup with the use of serial monitor, looks like i have to used a command here.
also i am looking at the pde code, do i have to add a value or is there going to be a user menu that can be edited, do i have to upload auto_feed.pde before vacation?..totally nob on coding :)


Thanks.
What I would suggest is that you take the pde I created and then merge your existing pde into it. This way you have the "vacation mode" ready to go whenever you wanted. In fact, you may even decide you want it to always be enabled so you never have to worry about feeding (or rushing home to feed or whatever).

Right now, there is no menu option to enable this mode for you. It would have to be enabled via the wifi or serial interface and enabled manually UNLESS you set the memory values via a pde similar to the set internal memory pde.

Currently, the client suite will not enable you to modify memory locations outside of the standard ones very easily. I've asked Dave to add in an"on the fly" type of reading/writing memory locations to make this simpler. So for now, it must be done manually.

Do you have a WIFI module?
This will simplify things and make it easier to update the values from memory. Plus, it will make enabling the vacation mode very simple. If not, we will just have to program them and then re-upload the controller code.

If you don't have WIFI, then we will want to set the memory values using arduino.

Let me know the answers to this. Also, if you could post your PDE file (attach it to a post) then we can merge the vacation mode code into your pde file so it would always be there for you whenever you needed (long weekends, vacations, late night at the office, etc).

curt
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

Hi Curt, i do have a wifi attachment. below is my pde file.

// Autogenerated file by RAGen (v1.0.4.92), (08/05/2011 19:08)
// RA_080511_1908.pde
//
// This version designed for v0.8.5 Beta 12 or later

/* The following features are enabled for this PDE File:
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define wifi
#define StandardLightSetup
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
ReefAngel.Init(); //Initialize controller

ReefAngel.FeedingModePorts = B11000000;
ReefAngel.WaterChangePorts = B11000000;
ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.LightsOnPorts = B00001011;

// Ports that are always on
ReefAngel.Relay.On(Port1);
ReefAngel.Relay.On(Port7);
ReefAngel.Relay.On(Port8);
}

void loop()
{
ReefAngel.ShowInterface();

// Specific functions
//ReefAngel.StandardLights(Port1);
ReefAngel.MHLights(Port2);
ReefAngel.StandardHeater(Port3);
ReefAngel.StandardLights(Port4);
ReefAngel.StandardFan(Port5);
ReefAngel.StandardATO(Port6);

// LED Ramp
// Have PWM on from 1pm to 11pm, with gradual 60 minute ramp up and down starting at the given times
// From 1pm to 2pm, actinic and 2pm to 3pm daylightthe PWM will slowly ramp from 0% to 80%
// From 9pm to 10pm, daylight and 10pm to 11pm actinic the PWM will slowly ramp from 80% to 0%
ReefAngel.PWM.SetActinic(PWMSlope(13,0,23,0,0,80,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(14,0,22,0,0,80,60,ReefAngel.PWM.GetDaylightValue()));

}



Thanks,
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

Cool. This will be simple to merge together. Once I get it merged, I'll post the PDE file for you and then the commands you will need to enter to set the values in the memory (and how to change them) plus how to enable and disable the vacation mode.

curt
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

thanks, can't wait to try it. :)
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

what ports do you want shutoff 10 minutes before?

what ports do you want turned on for the autofeeder?

curt
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

i want to shutoff Port 7 and 8 10 minutes before.
for autofeeder port 1.


Thanks
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

acabano wrote:i want to shutoff Port 7 and 8 10 minutes before.
for autofeeder port 1.
Thanks
Ok. Attached is the PDE file for you. I have it set to turn ports 7 & 8 off at the specified interval before starting the feeding mode. I also have port1 only turn on at the given feeding mode time then run for the specified amount of time and shutoff.

I would upload the code to the controller first before proceeding. It doesn't matter if you do or not, just makes things easier knowing that it's all ready to go.

Now, here comes the "fun stuff". We must add the values to memory so the controller can read them and use them.

Open up a web browser and type these in the URL / location box. I'm going to use my wifi module's IP address as an example (10.0.42.40). So where you see that IP address, you must replace it with your own IP address or else the command will not work.

Here's the commands you need to use to set the Start Hour and Minutes:

Code: Select all

// Set the start hour to 6 pm (18 hours)
http://10.0.42.40:2000/mb701,18
// Set the start minute to 0
http://10.0.42.40:2000/mb702,0
Here's the command to set the pump delay (minutes before the start time to shut off the pumps)

Code: Select all

// Set the delay to be 10 minutes before the start time
http://10.0.42.40:2000/mb703,10
Here's the command to set the run time for the auto feeder

Code: Select all

// Set the run time to be 10 minutes
http://10.0.42.40:2000/mb704,10
Lastly, here's the command you will use to enable/disable the auto feeding mode.

Code: Select all

// enable auto feed mode
http://10.0.42.40:2000/mb700,1
// disable auto feed mode
http://10.0.42.40:2000/mb700,0
Once you issue the first 4 commands, you won't have to use them again unless you need to change the values. The last 2 commands for enabling/disabling the auto feed mode are the ones you would use "often", aka whenever you want to turn it on or off. Now, there is no visual indicator on the display if you are in auto feed mode or not. This can be corrected if you want it to be. It will require the use of the Custom Main Screen to get things to work properly. Let me know if you would like this done as well. It won't take very long to get that working because I already did that in my testing.

curt
Attachments
autofeed.pde
auto feed mode
(3.42 KiB) Downloaded 477 times
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

Hi Curt, Can you please add a visual indicator, that way its easy for the user to check if the auto feed function is enabled. i will upload this pde later today and try it, thanks for the help.
Image
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

Hi Curt, it works like a charm :) exactly what i want... again thank you for your support.
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

That's great. I'm working on the visual indicator for you right now. I've got something created but haven't tested it. I was going to put a "V" to the left of the relay box to indicate it's in "vacation mode" or "A" for the "auto feed" mode. I'm thinking more of an "A" now that I think about it. I'll post once I get it tested and confirm. Also, you can change the letter to be whatever you want but I'd suggest just keeping it as 1 letter for simplicity.

curt
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

This should work for you. It shows the indicator to the left of the relay box.

curt
Attachments
autofeed.pde
(4.09 KiB) Downloaded 521 times
astralmind
Posts: 99
Joined: Fri Apr 01, 2011 10:53 am

Re: auto-feed

Post by astralmind »

that's pretty awesome, I was looking for something very similar to this. I'm leaving too early for work in the morning but would like to feed twice a day so this piece of code should come in handy soon enough.

On that very topic, any recommendations on "auto feeders" that actually do work ? I'm feeding NLS sinking pellets, 1mm. Now that the RA side of thing works I'm more concerned with the device dumping a whole bucket in my tank!
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

I modded my auto feeder, to trigger only when power is applied. so far it works but no guarantee...
Last edited by acabano on Fri Aug 12, 2011 10:58 am, edited 1 time in total.
Image
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

Curt, can you verify my pde if its correct, cuz i did not see the autofeed indicator. also i use simple menu for
space, is that affecting the code?


Thanks.
Attachments
Golden.pde
(5.42 KiB) Downloaded 476 times
Image
acabano
Posts: 49
Joined: Thu Jul 21, 2011 6:09 pm

Re: auto-feed

Post by acabano »

just found out i was using simple menu instead of custom menu... :)
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: auto-feed

Post by binder »

acabano wrote:just found out i was using simple menu instead of custom menu... :)
cool. Glad you got it figured out. :-)

curt
Post Reply