Hi guys,
I would like some help from you.
I have my water-level sensor in my freshwater reservoir.
I would like to have my buzzer (connected to actinic channel) activated when the level reaches 20%. It needs to be an interval, not continuous, lets say every minute for 1 second at 100% loudness.
It also needs to switch off my fresh water pump (relay 3).
Can somebody please provide me with a piece code.
That would be much appreciated.
Thanks in advance.
Leslie
Buzzer interval when waterlevel is low
Re: Buzzer interval when waterlevel is low
Is it less or more than 20%?
What function are you using right now for port 3?
What function are you using right now for port 3?
Roberto.
Re: Buzzer interval when waterlevel is low
Its in ATO reservoir so I would assume alert if less than 20%
-
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: Buzzer interval when waterlevel is low
Sorry, for replying so late and for not being clear.
I meant less than 20% and the power of my freshwater pump is connected to port 3.
My freshwater pump switches on when the float switch is activated in my sump. This float switch is a stand alone and not connected to the ReefAngel.
So basically it needs to switch Port 3 off when the level is lower than 20% in the fresh water reservoir and let a buzzer go with an interval. A continuous buzz will drive me and the rest of the family crazy.
Thanks for your help guys
Leslie
I meant less than 20% and the power of my freshwater pump is connected to port 3.
My freshwater pump switches on when the float switch is activated in my sump. This float switch is a stand alone and not connected to the ReefAngel.
So basically it needs to switch Port 3 off when the level is lower than 20% in the fresh water reservoir and let a buzzer go with an interval. A continuous buzz will drive me and the rest of the family crazy.
Thanks for your help guys
Leslie
-
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: Buzzer interval when waterlevel is low
This should do it:
Code: Select all
if (ReefAngel.WaterLevel.GetLevel() < 20) {
ReefAngel.Relay.Off(Port3);
ReefAngel.PWM.SetActinic( (now()%60<1)*100 ); // Set 100 to the volume % you want.
}
-
- Posts: 59
- Joined: Tue Nov 12, 2013 5:58 am
Re: Buzzer interval when waterlevel is low
Thank you Lee.
What does the %60<1 stand for?
Leslie
What does the %60<1 stand for?
Leslie
Re: Buzzer interval when waterlevel is low
% is a mathematical formula of modulo.
https://en.wikipedia.org/wiki/Modulo_operation
Basically it means one second out of every 60
https://en.wikipedia.org/wiki/Modulo_operation
Basically it means one second out of every 60
Roberto.