Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumProgramming Questions & HelpSyntax › Timer2 question

Page Index Toggle Pages: 1
Timer2 question (Read 4528 times)
11/14/10 at 15:25:31

CLiFoS   Offline
YaBB Newbies
Portugal

Posts: 1
*
 
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.
 
IP Logged
 
Reply #1 - 11/15/10 at 00:38:57

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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
 
IP Logged
 
Reply #2 - 02/15/11 at 20:25:24

HorseMaster   Offline
YaBB Newbies

Posts: 3
*
 
Yep I use one global variable called systemTimeMillis in honour of java, then reference that in my code.
 
IP Logged
 
Page Index Toggle Pages: 1