Appearance
Task 7 - Line Following Alphabot
Task
Line Following Alphabot
Functions To Do
- Sensor & Movement Logic
- Use 5 IR sensors to read the white line position and store values in an array.
- Calibrate sensors at startup for accurate detection.
- Continuously read sensor values and round them for stability.
- Calculate the line position using a weighted sum for proportional control.
- Implement PID control (proportional, integral, derivative) to follow the line smoothly.
- Adjust motor speeds based on PID output to keep the robot centered on the line.
- Motor Control
- Use PWM to control left and right motor speeds independently.
- Implement functions for turning left, right, and making 180-degree turns using motor direction and speed control.
- Stop motors when needed for precise maneuvers or at the end of the line.
- Feedback & Debugging
- Print sensor values and calculated positions to the serial monitor for debugging and calibration.