This folder contains the Arduino code (CarControl.ino) for the ESP32 microcontroller, which manages the car’s movement, obstacle detection, Wi-Fi communication, and LED indicators. The code creates a Wi-Fi Access Point, processes HTTP GET requests from the Android app, and uses the HC-SR04 sensor to detect obstacles.
- Arduino IDE: Download from arduino.cc.
- ESP32 Dev Module: Connected via USB.
- ESP32 Board Manager: For Arduino IDE compatibility.
- Install Arduino IDE from arduino.cc.
- Add ESP32 board manager:
- Go to
File > Preferences. - Add
https://dl.espressif.com/dl/package_esp32_index.jsonto Additional Boards Manager URLs. - Go to
Tools > Board > Boards Manager, searchesp32, and install.
- Go to
- Open
CarControl.inoin Arduino IDE. - Select
ESP32 Dev ModuleunderTools > Board. - Connect the ESP32 via USB, select the correct port, and click
Upload. - Open Serial Monitor (115200 baud) to view:
- Wi-Fi AP details (SSID:
Savana Node 01, IP:192.168.4.1). - Distance readings from HC-SR04.
- Received HTTP commands.
- Wi-Fi AP details (SSID:
- Wi-Fi Credentials: Update
ssidandpasswordinCarControl.inobefore deploying in public settings. Default credentials (Savana Node 01,iloveindia) are for testing only. - Hardcoded IPs: Requests are processed at
http://192.168.4.1/. Ensure the Android app targets this IP.
- Circuit Verification: Ensure connections match Circuit Diagram.
- Pin Configuration:
- HC-SR04: Trigger (pin 5), Echo (pin 18).
- LEDs: Left (pin 14), Right (pin 27).
- Motors (via L293D): M1_A (pin 21), M1_B (pin 19), M2_A (pin 23), M2_B (pin 22).
- Testing: Connect the Android app to the ESP32’s Wi-Fi AP and test all movements.
- Debugging: Use Serial Monitor to troubleshoot sensor readings or Wi-Fi issues.
For hardware details, see Bill of Materials.