Hi folks,
I'm trying to figure out a code to help me turn off port 8 that's currently setup as an 'always on' port. I need to turn it off for 20 minutes at 2 or 3 specific times of the day. I have an automatic feeder that I will program to work at those times. Currently dealing with food getting wasted from too much flow when feeding. If someone can use 11am and 4pm for a suggested code, that'd be great. Feel free to point me in the direction of the right thread if it already exists.
Thanks in advance!
How to turn off an 'always on' port a few times a day?
Re: How to turn off an 'always on' port a few times a day?
you could do it 2 different ways :
1. set port 8 to be off during feeding mode and then setup to trigger feeding mode at those times of day.
2. specifically turn off port 8 during those times if day.
how do you trigger your auto feeder? is it separate from the ra?
do you use feeding mode on the ra?
I'm just asking more questions up front to get a better idea on what will be the most versatile to do.
you can do it several ways, but the simplest way is usually the best and doing it so you don't have to reimplement other stuff is also good.
someone else will most likely chime in with a code sample for you.
Sent from my Moto X
1. set port 8 to be off during feeding mode and then setup to trigger feeding mode at those times of day.
2. specifically turn off port 8 during those times if day.
how do you trigger your auto feeder? is it separate from the ra?
do you use feeding mode on the ra?
I'm just asking more questions up front to get a better idea on what will be the most versatile to do.
you can do it several ways, but the simplest way is usually the best and doing it so you don't have to reimplement other stuff is also good.
someone else will most likely chime in with a code sample for you.
Sent from my Moto X
Re: How to turn off an 'always on' port a few times a day?
You can use it like this:
Code: Select all
ReefAngel.Relay.On(Port8);
if (hour()==11 && minute()<20) ReefAngel.Relay.Off(Port8);
if (hour()==16 && minute()<20) ReefAngel.Relay.Off(Port8);
Roberto.
Re: How to turn off an 'always on' port a few times a day?
You are right. The feeder is independent from the RA. I don't use feeding mode.binder wrote: how do you trigger your auto feeder? is it separate from the ra?
do you use feeding mode on the ra?
Re: How to turn off an 'always on' port a few times a day?
This does it!rimai wrote:You can use it like this:Code: Select all
ReefAngel.Relay.On(Port8); if (hour()==11 && minute()<20) ReefAngel.Relay.Off(Port8); if (hour()==16 && minute()<20) ReefAngel.Relay.Off(Port8);
I just tested it and works perfectly. The idea is just now to have the feedings scheduled in the middle of the 'off' time of the flow pumps and synchronize the clocks every couple of months or so.
Thanks a lot!
Re: How to turn off an 'always on' port a few times a day?
perfect. then you can have different functionality in the future if you ever changed how you did stuff.oscarinw wrote:This does it!rimai wrote:You can use it like this:Code: Select all
ReefAngel.Relay.On(Port8); if (hour()==11 && minute()<20) ReefAngel.Relay.Off(Port8); if (hour()==16 && minute()<20) ReefAngel.Relay.Off(Port8);
I just tested it and works perfectly. The idea is just now to have the feedings scheduled in the middle of the 'off' time of the flow pumps and synchronize the clocks every couple of months or so.
Thanks a lot!
Sent from my iPad mini