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

Expansion modules and attachments

Posts: 12188
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Aug 26, 2017 10:47 am
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.

Posts: 24
Joined: Fri Aug 18, 2017 10:11 am
PostPosted: Sat Aug 26, 2017 8:19 pm
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.

Posts: 24
Joined: Fri Aug 18, 2017 10:11 am
PostPosted: Sun Aug 27, 2017 9:01 am
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?

Posts: 12188
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Aug 27, 2017 11:38 am
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.
User avatar
Posts: 2724
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Mon Aug 28, 2017 4:58 am
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
Previous

Return to Addons

Who is online

Users browsing this forum: No registered users and 2 guests

cron