Skip to content

eccentricOrange/line-follower-std

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A basic line follower

This is the code for a prototypical line follower.

This robot has the following features:

  • It would use 3 infrared sensors to detect the line. Each sensor outputs a Boolean value.
  • It would follow differential drive principles for movement.
  • The expected control hardware is an Arduino-compatible microcontroller.
  • The expected motor driver is a something like an L293D or L298N motor driver.

Note that this project is written for Platform IO. If you just want the code, it's in src/main.cpp.

Logic

The logic in this program is very simple. It can be worked by using a model or drawing of the robot, and a line on a piece of paper.

The robot has 3 sensors, and 2 motors (or another even number). The sensors are placed on the left, middle, and right of the robot. The sensors are placed in a line, and the robot is placed on the line.

For every possible sensor configuration, the robot will move in a certain way, and if you can determine which movement will bring teh centre sensor to the line, you can determine the logic.

Motor control

This robot uses my own Differential Drive library, DDBot.

There is an upgraded version of this, which is expected to be smoother because it uses a closed-loop feedback system to actuate the motors. It is available in the line-follower-smooth repository.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages