Page 2 of 2

Re: I/O Expansion and ATO 1, 2, 3, 4....

Posted: Sat Aug 26, 2017 10:47 am
by rimai
What do you mean? I just did.
And then you asked to try to upload and replicate the problem here.
You have to wait until I find some time to do that.
You just requested that a couple of hours ago.

Re: I/O Expansion and ATO 1, 2, 3, 4....

Posted: Sat Aug 26, 2017 8:19 pm
by JclaasSA
Float switches were tried in various positions including that way you advised that is why I am asking that the problem is replicated on your side please and I hear you @rimai.

Re: WIFI Cloud and WIFI Attachment on 2 RA plusses

Posted: Sun Aug 27, 2017 9:01 am
by JclaasSA
Howzit @binder, @rimai, @Inevo. . will you guys upload that ato code your side and replicate to see if you also getting a different functionality please?

Re: I/O Expansion and ATO 1, 2, 3, 4....

Posted: Sun Aug 27, 2017 11:38 am
by rimai
Why don't you just start simple and use a simple on/off instead?
Much simpler and you can work on anything you want to add later.

Code: Select all

if (ReefAngel.IO.GetChannel(0)) then ReefAngel.Relay.On(Port2);
if (!ReefAngel.IO.GetChannel(1)) then ReefAngel.Relay.Off(Port2);
You will need to play around with the ! sign in the code, which means "NOT" depending on how you orient the float switches.
Basically the code reads is the channel 0 is active, turn on port 2 and if channel 1 is not active, turn off port 2.

Re: I/O Expansion and ATO 1, 2, 3, 4....

Posted: Mon Aug 28, 2017 4:58 am
by binder
agreed. one thing I learned from working with the code is make sure you understand it and test it out. so do like Roberto says, test out simple. first just have 1 float switch toggle a relay. this let's us know if you have the float switches working properly and connected properly. once you know both switches can control a port individually, then start combining them.

Sent from my XT1585 using Tapatalk