Understanding Custom Variables
- ewaldsreef
- Posts: 82
- Joined: Tue Oct 08, 2013 8:22 pm
- Location: Salt Lake City, UT
- Contact:
Understanding Custom Variables
Looking for someone who has made use of custom variables in the code. I am playing with an I/O expansion and trying to learn. Are there any good treads I can read on this topic?
Re: Understanding Custom Variables
You can use them as additional info you want to show on the portal.
For example, I use it to show the moon cycle for the day.
Some others have used them for dosing counter and timer.
So, basically you can use it for anything you have in mind that you may want to track.
You can also use it as triggers to a custom function. For example, to trigger a lightning storm or a DIY fish feeder.
For example, I use it to show the moon cycle for the day.
Some others have used them for dosing counter and timer.
So, basically you can use it for anything you have in mind that you may want to track.
You can also use it as triggers to a custom function. For example, to trigger a lightning storm or a DIY fish feeder.
Roberto.
- ewaldsreef
- Posts: 82
- Joined: Tue Oct 08, 2013 8:22 pm
- Location: Salt Lake City, UT
- Contact:
Re: Understanding Custom Variables
Can you post some code with an example? Sounds like fun
Re: Understanding Custom Variables
I use it like this:
Code: Select all
ReefAngel.CustomVar[1]=MoonPhase();
ReefAngel.CustomVar[7]=255;
Roberto.
Re: Understanding Custom Variables
I use it to show my dosing amounts, frequency, etc.
Code: Select all
// ******************* Assign custom variables for reporting on the portal *******************
ReefAngel.CustomVar[0]=Dosage; // Total amount per day
ReefAngel.CustomVar[1]=Doses; // Number of daily doses
ReefAngel.CustomVar[2]=Dispense; // Amount per dose to dispense
ReefAngel.CustomVar[3]=(1440/Doses)/60; // Hours between doses
ReefAngel.CustomVar[4]=(1440/Doses)%60; // Leftover minutes between doses
Re: Understanding Custom Variables
I have a function adjustAlk that if you use the wifi to set the custom variable it will do things accordingly. Check that function in my INO. I got it from AlanM
- ewaldsreef
- Posts: 82
- Joined: Tue Oct 08, 2013 8:22 pm
- Location: Salt Lake City, UT
- Contact:
Re: Understanding Custom Variables
Hopefully I will have some more time to play with the programing next week. Just finishing up little legue season for my boys.
One thing I would like to add to my code will be the option to top off with kalk vs regular ro depending on ph reading.
Lnevo, I seem to remember in your code you had an alart for full skimmer cup. I also would like to add that.
Thank you everyone for your help.
One thing I would like to add to my code will be the option to top off with kalk vs regular ro depending on ph reading.
Lnevo, I seem to remember in your code you had an alart for full skimmer cup. I also would like to add that.
Thank you everyone for your help.