Wiring Forum
http://wiring.org.co/cgi-bin/yabb/YaBB.pl
Programming Questions & Help >> Syntax >> Timer2 question
http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1289748331

Message started by CLiFoS on 11/14/10 at 15:25:31

Title: Timer2 question
Post by CLiFoS on 11/14/10 at 15:25:31
Hi guys,

I'd like to know if it's possible to use multiple timers using hardwaretimer2 library.

The point is to have several led strips on for a specific time, each with it's own time and combine that with a pir, so that when a time is over, the specific led strip would turn off.

Is it ok to use this timer or should I use a RTC and compares start and end times for each led strip?

Thanks in advanced.

Title: Re: Timer2 question
Post by barragan on 11/15/10 at 00:38:57
With Timer2 only one, but you could use several variables to keep track of each event and use the millis() command as in http://wiring.org.co/learning/basics/timerblink.html

Title: Re: Timer2 question
Post by HorseMaster on 02/15/11 at 20:25:24
Yep I use one global variable called systemTimeMillis in honour of java, then reference that in my code.

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.