Description:
This repository contains Arduino code for a line-following robot using the SparkFun TB6612 motor driver. The robot is designed to follow a line on the ground and implement PID control to stay on course.
Features:
- Two-wheel robot with individual motor control.
- PID control for accurate line following.
- Sensor calibration for optimizing line detection.
- Modular code structure for easy customization and extension.
Setup:
-
Connect your Arduino hardware with the SparkFun TB6612 motor driver and analog line sensors.
-
Upload the provided Arduino code to your device.
-
Follow the calibration procedure to set sensor thresholds.
Usage:
The robot follows lines on the ground, adjusting its motor speeds using PID control to stay centered on the line.
Repository Contents:
arduino_code.ino
: The Arduino code for the line-following robot.
Getting Started:
-
Clone or download this repository to your local machine.
-
Upload the
arduino_code.ino
to your Arduino board. -
Follow the wiring instructions for the SparkFun TB6612 motor driver and line sensors.
-
Calibrate the sensors using the provided calibration function.
-
Observe the robot following lines with PID control.
Contributing:
If you'd like to contribute to this project, feel free to open issues, suggest improvements, or create pull requests. We welcome any enhancements to the code.