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!