A DEAD reckoning program

We are going to add autonomus to our robot please i am asking if any one can email me a program that does dead reckoning. Please let it be a program that can control the speed of the motor. like one go forward other stop something like that. And please can you also tell me how to set up this program and what equipments we need use these thing and how to get it done

2003 Automated Dead Reckoning Test Code uploaded/authored by Greg McCoy into the Programming

This drive code is intended for less experienced programmers to get a place to start with the code and start testing on existing robots. This code is based on the old Default code, so it works on all controllers, but will need to be updated or modified to work as competition code. The numbers used to determine distance will change for your robot, so you will have to do some tweaking here. All of this is documented fairly well in the program text. Plug joysticks into ports 1 and 3 on the OI, plug the drive Victors into PWM 1 and PWM 2, and you’re set to go! Use the throttle wheel on port 3 to control automatic code on or off.

Update: I’ve fixed a silly typo that made the last step 7 instead of step 6 as it should be. Sorry about this!

Check it out here!


very nice baseline code. You used ‘stepnum’ to sequence the same way I did in my auton SW.

couple comments.

you left a debug statement intact - that will slow the cycle times way down

you have no ramping between changes in motor speeds (unless I missed it) If you switched the PWMs on our bot from 0 to 254 in one cycle the gearheads would spleen you with the jagged remains of the tranny shafts!

your timing is pretty long (120 counts is about 3 seconds) - if you have a fast bot then shorten the counts down, try it first, and then adjust as needed. Try driving your bot with the joystick first to get a rough idea of how long each step will take, and use 40 counts for each second - that will get you close.

I can’t take credit for this or answer any of your questions. First, I didn’t write the code (heck, I dont even know how) Greg McCoy did. I know he’s registered here so you will have to get his attention to get your questions answered.

I’ll bring this to his attention if I see him around here at school.

I worked with Greg on this project and this was put together to give teams a little jump start to doing their autonomous, not do it for them. If they have any questions about it, contact Greg and I will also let him know

This isn’t the best Start, but you may want to check out my CopyCat Program in the white papers section. Do a little Tweaking, Give it a try…