note: this page is a place holder until a better tutorial is written
Autoconfig This algorithm allows your robot to determine its own binary threshold for detecting the line.
How to Use This Algorithm Set up your IR emitter/detector sensors
and place all of them facing the concrete. Get a reading, then place all of
them on the white line and get another reading. Now you have two readings for
each IR. Find the average of each, and set them as the threshold for each.
Pseudocode:
read IR1c //read on concrete
read IR2c
read IR1w //read on white line
read IR2w
Infrared line detection with 2 IR This algorithm allows your robot to follow a white line.
How to Use This Algorithm Set up your two IR emitter/detector sensors
so that one is on the left of the line and the other on the right. As long as neither
detects the white line it means your robot is following the line. If either detects the line,
the robot must make course corrections.
Pseudocode:
read leftIR
read rightIR
if leftIR detects line
then turn robot left until not true
if rightIR detects line
then turn robot right until not true
if neither IR detects line
then robot goes straight
loop
Has this site helped you with your robot? Give us credit -
link back, and help others in the forums! Society of Robots copyright 2005-2013