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

Expansion modules and attachments
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
JclaasSA
Posts: 25
Joined: Fri Aug 18, 2017 10:11 am

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

Post 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.
JclaasSA
Posts: 25
Joined: Fri Aug 18, 2017 10:11 am

Re: WIFI Cloud and WIFI Attachment on 2 RA plusses

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

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

Post 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.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

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

Post 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
Post Reply