I am trying to use channel one on the multilevel water sensor for my auto top off.
The problem is using the Wizard it defaults to channel 0, how do I change this to go to channel one? go inside the library?
Thanks!
Drew
Multi Channel water level sensor
Re: Multi Channel water level sensor
The libraries only support the single channel at the moment.
I created a bug report to add support to the new channels.
https://github.com/reefangel/Libraries/issues/138
I created a bug report to add support to the new channels.
https://github.com/reefangel/Libraries/issues/138
Roberto.
Re: Multi Channel water level sensor
So if I wanted to program it without the wizard how would I program that to turn a port on or off based about the level of the water of sensor 1(on at X% off at Y%).
Thanks!
Thanks!
Re: Multi Channel water level sensor
Try this:
Code: Select all
if (ReefAngel.WaterLevel.GetLevel(1)<=20) ReefAngel.Relay.On(Port1);
if (ReefAngel.WaterLevel.GetLevel(1)>=30) ReefAngel.Relay.Off(Port1);
Roberto.
Re: Multi Channel water level sensor
Gotta remember this for when I get my multi level unit in about a month.
Re: Multi Channel water level sensor
Okay so what if I wanted a time out on that? Also can I do conditional such as If Sensor 1 is above X AND Sensor 2 is above Y then turn the pump on?
I am planning on having one in my water top off tank so I would like it to text/email me when below X and then Text/email me AND not allow the port to turn on when below Y%.
Does that make sense? Thanks! I am still learning how this programming thing works
Also I am planning on
I am planning on having one in my water top off tank so I would like it to text/email me when below X and then Text/email me AND not allow the port to turn on when below Y%.
Does that make sense? Thanks! I am still learning how this programming thing works
Also I am planning on
Re: Multi Channel water level sensor
The timeout is not implemented yet.
It is in the list of issues: https://github.com/reefangel/Libraries/issues/138
For and comparisons you can use this:
According to this code, there pump would not turn on if 1 is below 20 or 2 is below 30.
Both the conditions need to be true in order for the pump to turn on.
That's what the && sign is for. It reads AND.
Here is some more info:
http://arduino.cc/en/Reference/Boolean
It is in the list of issues: https://github.com/reefangel/Libraries/issues/138
For and comparisons you can use this:
Code: Select all
if (ReefAngel.WaterLevel.GetLevel(1)>=20 && ReefAngel.WaterLevel.GetLevel(2)>=30)
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.Off(Port1);
Both the conditions need to be true in order for the pump to turn on.
That's what the && sign is for. It reads AND.
Here is some more info:
http://arduino.cc/en/Reference/Boolean
Roberto.