This project features a multi-mode robot controlled via a mobile application (Bluetooth) and capable of autonomous, stabilized line following.
This simulation demonstrates the robot's logic for stable line following. You can test the autonomous behavior by pressing the green sensor buttons.
The robot cycles between two main modes via the Mode Switch Button (D12):
| Mode | Control Method | Primary Logic |
|---|---|---|
| RC Mode | Bluetooth (Joystick X/Y/P) | Direct control of motor speeds based on joystick coordinates. |
| Line Follow | Autonomous | Smart Correction System: Calculates how far the robot is from the center of the line to apply smooth, proportional motor speed adjustments, ensuring high-speed stability. |
- Microcontroller: Arduino Uno
- Driver: L298N Motor Driver
- Comms: HC-05/HC-06 Bluetooth Module
- Ground Sensors: 3x IR Line Sensors (L/C/R)
| Component | Arduino Pin | Description |
|---|---|---|
| Left Motor | D5 (DIR), D7 (PWM) | Left wheel control. |
| Right Motor | A0 (DIR), A2 (PWM) | Right wheel control. |
| Left Line Sensor | A3 | Left sensor input. |
| Center Line Sensor | A4 | Center sensor input. |
| Right Line Sensor | A5 | Right sensor input. |
| Mode Button | D12 | Toggles between RC and Line Follow modes. |
| Left LED | D10 | Turn indicator. |
| Right LED | D11 | Turn indicator. |
| Bluetooth (TX/RX) | D3/D2 | SoftwareSerial communication. |
The control application is provided as an MIT App Inventor file (.aia), pre-configured to send the correct Bluetooth protocol to the Arduino.
- Download the application file :
RC_SUMO_Controller.aia(File to be provided separately). - Access MIT App Inventor : Go to
ai2.appinventor.mit.edu. - Import the project : Click on Projects > Import project (.aia) from my computer and select the provided file.
- Generate the APK : In App Inventor, click Build > Android App (.apk file) and install the resulting file on your Android smartphone.
- Connect Bluetooth : Pair your phone with the HC-05/HC-06 module (pairing code is typically
1234or0000). - App Protocol : The app sends a synchronized 5-byte packet at 9600 baud to control the robot:
| Position | Data Type | Value Range | Role |
|---|---|---|---|
| 1 | Sync Marker | 255 | Required start marker for packet synchronization. |
| 3 | Axis X |
|
Lateral direction control (Joystick Left |
| 4 | Axis Y |
|
Speed control (Joystick Forward |
| 5 | Power P |
|
Maximum speed limit (Slider/Curser). |
MIT License - Copyright (c) 2024 simonet4