Page 1 of 1

Basic float switch question

Posted: Fri Nov 22, 2013 7:39 am
by aspec
I have not looked into the RA Wizard to see if this is possible yet, but I am wondering the following:

I want to setup a single float switch in my ATO reservoir so that when it's low on water it can send me an alert on my phone (via SMS/text/email... something) and turn off a certain relay socket (keep the pump from running when there is no water).

Is this covered in the wizard or will I need to do some research and write this code myself?

And finally, regarding the single float switch... I've looked at the user manual and can not determine how to position a single float switch for proper operation. Do I want the threads/nut side of the switch UP (fig A below) or DOWN (fig B below)?

Image


Thanks

Re: Basic float switch question

Posted: Fri Nov 22, 2013 9:39 am
by rimai
For this purpose, you can mount whichever way you wish.
Use this for A:

Code: Select all

ReefAngel.Relay.Set(Port1,!ReefAngel.LowATO.IsActive);
Or this for B:

Code: Select all

ReefAngel.Relay.Set(Port1,ReefAngel.LowATO.IsActive);
Then, you can set the portal to alert you using the ATOLOW as a trigger.
Just keep in mind that the portal only receives data every 5 minutes.

Re: Basic float switch question

Posted: Fri Nov 22, 2013 10:35 am
by aspec
Perfect, thanks Roberto.

Re: Basic float switch question

Posted: Sun Nov 24, 2013 1:28 pm
by aspec
Roberto,

The code won't verify with your suggestion above.

sketch_nov24b.cpp: In function 'void loop()':
sketch_nov24b:72: error: could not convert 'ReefAngel.ReefAngelClass::LowATO.RA_ATOLowClass::IsActive' to 'bool'
sketch_nov24b:72: error: in argument to unary !



Any ideas?

Re: Basic float switch question

Posted: Sun Nov 24, 2013 3:09 pm
by binder
rimai wrote:For this purpose, you can mount whichever way you wish.
Use this for A:

Code: Select all

ReefAngel.Relay.Set(Port1,!ReefAngel.LowATO.IsActive);
Or this for B:

Code: Select all

ReefAngel.Relay.Set(Port1,ReefAngel.LowATO.IsActive);
Then, you can set the portal to alert you using the ATOLOW as a trigger.
Just keep in mind that the portal only receives data every 5 minutes.
aspec wrote:Roberto,

The code won't verify with your suggestion above.

sketch_nov24b.cpp: In function 'void loop()':
sketch_nov24b:72: error: could not convert 'ReefAngel.ReefAngelClass::LowATO.RA_ATOLowClass::IsActive' to 'bool'
sketch_nov24b:72: error: in argument to unary !



Any ideas?
change it to this:

Code: Select all

ReefAngel.Relay.Set(Port1,ReefAngel.LowATO.IsActive() );
add in parentheses to the functions

Sent from my Nexus 7