Quote:
Originally Posted by Slick
Can someone show me a way to write a function that can delay the robot. I would like to write a function and put it in ‘user_routines.c’ and call it anywhere in my ‘user_routines_fast.c’ file. Simply I would like to:
{
pwm13 = 167;
pwm15 = 167;
delay = 100;
}
where ‘delay =’ would pause the robot for whatever time you gave it. Your help would be appreciated. What would the function look like? Thanks...
|
... for autonomous no doubt.
Perhaps you will find some insight in
this recent thread
I'd suggest structuring your autonomous code to run every 26ms (off the SPI data updates), tuck some timers into that, and structure you code as a state machine.