Saturday, November 5, 2011

line tracer with programming part2

from:http://www.roboticsindia.com/entry.php/183-Competitions-Robotics-3-The-Build-and-a-Fast-Line-Follower-using-PID


The above code is for a decently advanced line follower written by me over a Sunday evening. Most of the code comes from Pololu Documentation with some customizations for my Robot. The compiler is AVR-GCC being run inside AVR Studio.

The robot does self calibration based on environment to optimizes its sensor reading for line following, this can be seen in the video. Once calibrated it waits for user input to start.

There are basically two choices available -

void follow()

This is the simple line following function which just goes left and right based on the location of the line.

void followPID()

This is a PID based line following mechanism with some of my own customization to prevent robot from skidding. Please do optimize the code if you ever use it. The built robot is quite fast , but due to the small course we are not able to see the real speed.

For the documentation of functions and idea used please refer to the link below

Pololu QTR Sensor Functions



No comments:

Post a Comment