View Single Post
  #1   Spotlight this post!  
Unread 20-02-2004, 21:10
actorindp actorindp is offline
Registered User
#0270
 
Join Date: Jan 2004
Location: Long Island, New York
Posts: 11
actorindp is on a distinguished road
Lightbulb Answers for Dead Reckoning... FOR BEGINNERS

Figured I'd throw in my 2 cents.
I don't know C, I'm just flying by the seat of my pants manipulating code. So hopefully this post will help out others like me, the ones that are just trying to get by.

First start by creating the interrupt timer. Use the Innovation First White Paper to do this. http://www.innovationfirst.com/FIRST...004-Jan-14.pdf

The only thing i didnt use was the t25msdelay, theres no need to. I also just changed the printf statement to show the value of secondCount , nothing more.

If everything works you should now just have a basic second timer, however you might see it moves a lot quicker than 1 second. At least mine does... (hopefully this occurs across the board or the rest of this post means crap)

It actually moves in quarter second intervals. So every tick is .25 of a second.

Then just start creating if statements to drive yourself around.

Your last if statement should read something like this;

if (secondCount > 60) since the timer goes at quartersecond intervals, theres your 15 seconds. You might want to bring it down to say 56 or what have you just to play it on the safe side. at that statement you can turn off the timer and continue the rest of your program.

Once I get back to the bot on monday I'm gonna start some trial and error on our replica field. I'm gonna use a joystick button to start and stop the timer and movement so I can plug those values in the code.


Like I said before, I don't know what I'm doing. This is a very basic approach, heck I'm not even sure if It'll work , but I'd figure I'd put in my two cents, so other teams in my position can have a starting point for dead reckoning.

Enjoy!!

-Nick

Be glad to try and help, gimme a shout!
AIM: Actorindp

Please, if you have anything to add don't hesitate to post!!