View Single Post
  #22   Spotlight this post!  
Unread 12-03-2004, 11:42
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,868
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: quick question: TIMERS

Quote:
Originally Posted by Xufer
now if i was to use the timers that kevin has on his site inorder to do a dedreckoning autonomus what would it look like ? I begin to have a little more trouble when the interrupts are thrown in there i looked through the actuall clock.c file and the user_routines_fast.c file how would i specify time lengths for an action ? Im not too sure how the interupts work i read the first white paper on them but my understanding of them are still kinda wavy.
In Kevin's examples you can use the "Clock" variable as your check.
e.g.,
Code:
if (Clock < 10) // Clock is in tenths of seconds
	// Do first thing
else if (Clock < 30) // @ 3 second
	// Do another thing
else if (Clock < 60) // @ 6 seconds
	// Keep adding stuff to do
.
.
.
else if (Clock < 150) // @ 15 seconds
	// Make sure you stop all engines at the end
There are lots of other autonomous examples spread through the forums.

[edit] Corrected the ">" , typed too freely. Thanks Jamie!
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-03-2004 at 19:08.