Hi,
I've bought I/O expansion module, but after connecting it I don't know what to do next...
I have 5 float switches. I will use them to monitor all my tank water levels.
1 - Low
2 - High
3 - Low
4 - High
5 - Low
Now I don't know how to add custom screen to my RA and how to setup such functionality for float switches.
So basically what I need:
1) code which will add new page in my current screen
2) code which control float switches as mentioned above
Maybe someone can help?
Thanks in advance.
I/O Expansion module code
Re: I/O Expansion module code
The new 2014 screen adds it automatically. Place this in your setup():
Then, use something like this in loop():
In the portal, you can set a trigger for C0>0.
Code: Select all
ReefAngel.Use2014Screen();
Code: Select all
ReefAngel.CustomVar [0]=0; // Initial value. Anything other than 0 means an alert.
ReefAngel.CustomVar [7]=255; // This is a dummy to make sure the Custom Variables is always enabled in the Portal
if ( ReefAngel.IO.GetChannel(1) ) ReefAngel.CustomVar [0]=1;
if ( !ReefAngel.IO.GetChannel(2) ) ReefAngel.CustomVar [0]=2;
if ( ReefAngel.IO.GetChannel(3) ) ReefAngel.CustomVar [0]=3;
if ( !ReefAngel.IO.GetChannel(4) ) ReefAngel.CustomVar [0]=4;
if ( ReefAngel.IO.GetChannel(5) ) ReefAngel.CustomVar [0]=5;
Roberto.
Re: I/O Expansion module code
Thanks. And how to change labels for I/O channels?
Re: I/O Expansion module code
Sorry, not available yet
Can you create an issue request on our github, so we can work on this for future releases?
https://github.com/reefangel/libraries/issues/
Can you create an issue request on our github, so we can work on this for future releases?
https://github.com/reefangel/libraries/issues/
Roberto.