This repository contains multiple Arduino sketches for controlling and testing self-driving cars for physics lab experiments. The main goal is to achieve straight-line motion with minimal manual calibration, suitable for classroom use with multiple cars.
src/— All Arduino sketches (.ino files)wiring_diagram.txt— Pinout and wiring reference.gitignore— Ignore build and editor filessetup_arduino.sh,check_connection.sh— Setup and diagnostic scripts
self_correcting_car.ino— Uses line tracking sensors for automatic straight-line correction (recommended)alternating_correction_car.ino— Software-only solution, alternates motor corrections to average out driftstraight_line_motion.ino— Simple constant velocity motion, no correction- Other sketches are for diagnostics, IR remote, and advanced features
- Upload the desired sketch from
src/to your Arduino car. - For best results, use
self_correcting_car.inoand place black tape on the floor for line following. - For quick deployment on many cars, use
alternating_correction_car.ino.
- See
setup_arduino.shfor automated environment setup on macOS. - See
wiring_diagram.txtfor hardware connections.
MIT