Uneven intervals

Do you have a question on how to do something.
Ask in here.
Post Reply
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Uneven intervals

Post by Poiromaniax »

Hi guys,

How would I code uneven intervals for my Tunze (not controllable)

Lets say I want it off for 20min and then on for 10?

thanks
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Uneven intervals

Post by rimai »

if (now()%1800<1200) // calculated in seconds. 1800s is total cycle and 1200 is the first part of the cycle.
{
// Do something for 20 min
}
else
{
// Do something for 10 min
}
Roberto.
Poiromaniax
Posts: 180
Joined: Thu Apr 05, 2012 6:20 am
Location: JHB, South Africa

Re: Uneven intervals

Post by Poiromaniax »

Thanks Roberto :)
Image
Post Reply