Skip to content

Commit de7f140

Browse files
committed
fix: added apk and aia also updated readme
1 parent 31f9c6e commit de7f140

File tree

5 files changed

+49
-22
lines changed

5 files changed

+49
-22
lines changed

AIOR.aia

98.2 KB
Binary file not shown.

AIOR.apk

3.66 MB
Binary file not shown.

AIOR.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void loop() {
100100
else if (bt_ir_data == 2) { backward(); }
101101
else if (bt_ir_data == 3) { turnLeft(); }
102102
else if (bt_ir_data == 4) { turnRight(); }
103-
else if (bt_ir_data == 5) { Stop(); }
103+
else if (bt_ir_data == 5 || bt_ir_data == 0) { Stop(); } // 0 or 5 = Stop
104104

105105
// Voice control (momentary)
106106
else if (bt_ir_data == 6) { turnLeft(); delay(400); bt_ir_data = 5; Stop(); }
@@ -189,7 +189,7 @@ void sweepServo(int startAngle, int endAngle, int step) {
189189
delay(20);
190190
}
191191
} else {
192-
for (int a = startAngle; a >= endAngle; a += step) {
192+
for (int a = startAngle; a >= endAngle; a -= step) {
193193
scanServo.write(a);
194194
delay(20);
195195
}
@@ -239,7 +239,7 @@ void Check_side() {
239239
delay(150);
240240
distance_R = Ultrasonic_read();
241241

242-
// Return center
242+
// Return center
243243
sweepServo(0, 70, 5);
244244
delay(150);
245245

README.md

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
_A Line Follower + Obstacle Avoiding Robot Car Controlled by IR Remote & Mobile App_
44

5-
![Arduino](https://img.shields.io/badge/Arduino-UNO-blue?logo=arduino)
6-
![License](https://img.shields.io/badge/License-Apache%202.0-green)
7-
![Platform](https://img.shields.io/badge/Platform-Arduino%20IDE-orange)
8-
![Status](https://img.shields.io/badge/Status-Active-brightgreen)
5+
<div>
6+
7+
![Arduino](https://img.shields.io/badge/Arduino-UNO-blue?logo=arduino)
8+
![License](https://img.shields.io/badge/License-Apache%202.0-green)
9+
![Platform](https://img.shields.io/badge/Platform-Arduino%20IDE-orange)
10+
11+
</div>
912

1013
---
1114

@@ -60,11 +63,11 @@ This project is perfect for **students, hobbyists, and robotics enthusiasts** wh
6063
- **Microcontroller:** Arduino UNO
6164
- **Motor Driver:** L298N for left & right motors
6265
- **Sensors:**
63-
- IR sensors → Line following & obstacle detection
64-
- Ultrasonic sensor → Distance measurement
66+
- IR sensors → Line following & obstacle detection
67+
- Ultrasonic sensor → Distance measurement
6568
- **Control Modules:**
66-
- HC-05 Bluetooth → Mobile app control
67-
- IR Receiver → Remote control
69+
- HC-05 Bluetooth → Mobile app control
70+
- IR Receiver → Remote control
6871
- **Servo Motor:** Rotates ultrasonic sensor for scanning
6972

7073
---
@@ -73,11 +76,10 @@ This project is perfect for **students, hobbyists, and robotics enthusiasts** wh
7376

7477
### IR Remote
7578

76-
- `+` → Move Forward
77-
- `-` → Move Backward
78-
- `>>|` → Turn Right
79-
- `|<<` → Turn Left
80-
- `>` → Stop
79+
- `` → Move Forward
80+
- `` → Move Backward
81+
- `` → Turn Right
82+
- `` → Turn Left
8183
- `1` → Obstacle Avoidance Mode
8284
- `2` → Line Follower Mode
8385
- `3` → Manual Mode
@@ -91,6 +93,25 @@ This project is perfect for **students, hobbyists, and robotics enthusiasts** wh
9193

9294
---
9395

96+
## 🎮 Command Mapping Table
97+
98+
| App Control (MIT Block) | Data Sent (1‑Byte Number) | Arduino Code Interprets As | Robot Action |
99+
| ----------------------------------- | ------------------------- | -------------------------- | ---------------------------- |
100+
| **Forward (TouchDown)** | `1` | `bt_ir_data == 1` | Move Forward |
101+
| **Backward (TouchDown)** | `2` | `bt_ir_data == 2` | Move Backward |
102+
| **Left (TouchDown)** | `3` | `bt_ir_data == 3` | Turn Left |
103+
| **Right (TouchDown)** | `4` | `bt_ir_data == 4` | Turn Right |
104+
| **Stop / Button Release (TouchUp)** | `0` | `bt_ir_data == 0` → Stop | Stop Motors |
105+
| **Stop Button (optional)** | `5` | `bt_ir_data == 5` | Stop Motors |
106+
| **Voice Left** | `6` | `bt_ir_data == 6` | Short Left Turn (momentary) |
107+
| **Voice Right** | `7` | `bt_ir_data == 7` | Short Right Turn (momentary) |
108+
| **Manual Mode** | `8` | `mode = 0` | Switch to Manual Control |
109+
| **Line Follower Mode** | `9` | `mode = 1` | Enable Line Following |
110+
| **Obstacle Avoid Mode** | `10` | `mode = 2` | Enable Obstacle Avoidance |
111+
| **Slider (Speed Control)** | `21–255` | `Speed = data` | Adjust Motor Speed (PWM) |
112+
113+
---
114+
94115
## 📱 Mobile App Setup
95116

96117
- Install the provided **APK** on your Android device
@@ -122,14 +143,20 @@ This project is perfect for **students, hobbyists, and robotics enthusiasts** wh
122143

123144
### Robot Car Build
124145

125-
<img src="docs/robo_2.png" alt="Robot Car Front View" width="400"/>
126-
<img src="docs/robo_1.png" alt="Robot Car Back View" width="400"/>
146+
<p>
147+
<img src="docs/robo_2.png" alt="Robot Car Front View" width="350"/>
148+
<img src="docs/robo_1.png" alt="Robot Car Back View" width="350"/>
149+
</p>
150+
151+
### 🎥 Full Demo on YouTube
152+
153+
[![Demo Video](docs/play.png)](https://youtu.be/u6bmt4iUy5o?si=hHZo-fITO03jiOHA)
127154

128-
### Full Demo on YouTube
155+
### Remote
129156

130-
<a href="https://youtu.be/u6bmt4iUy5o?si=hHZo-fITO03jiOHA" target="_blank">
131-
<img src="docs/play.png" alt="Demo Video" width="250"/>
132-
</a>
157+
<p>
158+
<img src="docs/ir_remote.png" alt="IR Remote" width="250"/>
159+
</p>
133160

134161
---
135162

docs/ir_sensor.png

-38 KB
Binary file not shown.

0 commit comments

Comments
 (0)