Entering the robotic competition was a last minute decision, and I didn't
get to work on it as much as I would have liked to. I did OK in my run,
but racked up plenty of penalties. I started with 2 penalties for being
over length, and received more for skipping the hill section. While the
Bedlam has enough power to get over the hill, I didn't have any way to
detect when it got to the hill area to increase motor power.
The program is straightforward. After initializing the PWM and A/D sections of the PIC 16F877, it lets the user select running speed via a potentiometer on AD0 then waits for the user to press a button on RB0 to begin the run. When the left or right down-pointing IR detector senses a black line, the robot stops, backs up, and pivots a little. It then resumes forward motion. Written in C. Click here to see the source code. |
Return to the top Robot page.
|