View Single Post
  #9   Spotlight this post!  
Unread 31-12-2012, 17:53
Chimera0x694's Avatar
Chimera0x694 Chimera0x694 is offline
Registered User
AKA: Kelly Malone
FRC #1684 (The Chimeras)
Team Role: Programmer
 
Join Date: Dec 2012
Rookie Year: 2010
Location: Lapeer,MI
Posts: 10
Chimera0x694 is just really niceChimera0x694 is just really niceChimera0x694 is just really niceChimera0x694 is just really nice
Arrow Re: Recording times from a timer

You would do it the same way that you would program a time based autonomous function. Determine how fast your processor is running through your code (every 50 milliseconds, every 10 milliseconds, etc.) by establishing a count, and timing how long it takes to reach 100 for example. Lets say you did this and got that it takes 3.5 seconds to run through your code 100 times. That means that your code is run through once every 0.035 seconds. Now lets say that the amount of "count" in between the first reading and the second reading was 200. So, you would then multiply 200 by 0.035, and that will get you the time between readings. (I fudged the numbers so don't assume that this will be anything like you will get)
__________________

"How do you pronounce your name?"
We get asked this question a lot. Or, We are called "chi-mare-ahs" Or, "chI-mare-ahs"
To set the record straight, It's pronounced "kI-mare-ahs"

2011-
Ranked 172nd in the state of Michigan
2012-
Ranked 24th in the state of Michigan
Kettering University District-Quality Award