how do i use the reading of temp probe 2 in a "if" statement like:
if (tempprobe2 <= 760)
{
do something
}
and while im posting... will this work to have moonlights on from the end of standardlights until 3am? basically i want to have the moonlights go off at 3am.
if ( hour() >= 20 && hour () <= 3 )
{
ReefAngel.MoonLights(Port2); // Moonlights or Refugium
}
using temp probes for other code.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: using temp probes for other code.
Code: Select all
if (ReefAngel.Params.Temp[T2_PROBE]<= 760)
You need to use ||, which means or.
Code: Select all
if ( hour() >= 20 && hour () <= 3 )
{
ReefAngel.MoonLights(Port2); // Moonlights or Refugium
}
else
{
ReefAngel.Relay.Off(Port2);
}
Roberto.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
-
Meshmez
- Posts: 32
- Joined: Fri May 11, 2012 2:44 pm
Re: using temp probes for other code.
awesome!
Thanks for both posts!
Thanks for both posts!