Timer

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
Rob235
Posts: 6
Joined: Thu Jan 03, 2013 10:46 am

Timer

Post by Rob235 » Thu Jan 03, 2013 10:58 am

Hi,

I'm new to Arduino and have some experience with PICAXE.

I'm looking for a timer function that is interrupt based as I want to write a sketch that will read an analogue pin each second. I found a library called MsTimer which I installed then used the sample sketch to flash the LED however it doesn't seem to work. Does anyone know if this is hardware related? eg Leostick doesn't support MsTimer perhaps?

Thanks in advance.

nonentity
Posts: 13
Joined: Fri Aug 24, 2012 7:35 am

Re: Timer

Post by nonentity » Thu Jan 03, 2013 11:18 am

Not really sure about MsTimer, but it sounds like you could just use the delay() function? ;)

Rob235
Posts: 6
Joined: Thu Jan 03, 2013 10:46 am

Re: Timer

Post by Rob235 » Fri Jan 04, 2013 10:47 am

Update:

MsTimer works if you use the version on this page:

http://www.pjrc.com/teensy/td_libs_MsTimer2.html

Post Reply