Search Here
MISC
Parts List
Robot Forum
Chat
Member Pages
Axon MCU
Robot Books
Shop
Contact
SKILLS
How To Build A Robot Tutorial
Calculators
Mechanics
Programming
Miscellaneous
Robots
Space
HARDWARE
Actuators
Batteries
Electronics
Materials
Microcontrollers
Sensors
SCIENCE
Robot Journals
Robot Theory
Conferences
|
PROGRAMMING - LINE FOLLOWING
This page goes with tips to win MOBOT.
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:
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
|
Get Your Ad Here
|