Skip to content

Commit b9343bc

Browse files
Add previous projects as regular folders
1 parent c79fb70 commit b9343bc

18 files changed

Lines changed: 697 additions & 2 deletions

CodingMoves-RCPlus

Lines changed: 0 additions & 1 deletion
This file was deleted.

CodingMoves-RCPlus/README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# CodingMoves-RC+
2+
## 🚗 WiFi-Controlled RC Car using NodeMCU (ESP8266)
3+
4+
A fun IoT project where you control an RC car over WiFi using your mobile phone. This project uses a NodeMCU (ESP8266) board, L298N motor driver, and a basic HTML interface.
5+
6+
---
7+
8+
9+
**Course:** Digital Logic Design (DLD)
10+
**Semester:** 2rd
11+
**Submitted To:** Engr. Romaisa Shamshad Khan
12+
**Submitted By:**
13+
- *Moavia Amir* (2k24_BSAI_72)
14+
- *Muhammad Dawood* (2k24_BSAI_48)
15+
- *Fatima Hassan* (2k24_BSAI_07)
16+
- *JAVERIA BABAR* (2K24_BSAI_14)
17+
18+
---
19+
## 📸 Final Project Snapshot
20+
21+
22+
23+
<img src="images/Car.jpg" alt="Final RC Car" width="200" height="200"/>
24+
<img src="images/car_pic.jpg" alt="Final RC Car" width="200" height="200"/>
25+
26+
---
27+
28+
## 📂 Project Folder Structure
29+
30+
Below is the folder structure for the WiFi-Controlled RC Car project:
31+
32+
```markdown
33+
iot-rc-car-controller/
34+
35+
├── code/
36+
│ └── rc_car_controller.ino # ESP8266 code in C++
37+
38+
├── interface/
39+
│ └── index.html # Controller code
40+
41+
├── images/
42+
│ └── demo.jpg # Image of the final car setup
43+
44+
├── docs/
45+
│ └── circuit_diagram.png # Circuit diagram for wiring
46+
| └── Proposal.pdf
47+
| └── Report.pdf
48+
49+
└── README.md # This documentation file
50+
```
51+
52+
---
53+
54+
## 🌐 Social Media Accounts
55+
56+
Follow **Coding Moves** on all platforms for more fun projects:
57+
58+
- 🧠 YouTube: [@Coding_Moves](https://www.youtube.com/@Coding_Moves)
59+
- 👨‍💻 GitHub: [Muawiya-contact](https://github.com/Muawiya-contact)
60+
- 💼 LinkedIn: [Moavia Amir](https://linkedin.com/in/contactmuawia)
61+
- 📊 Kaggle: [Moavia Amir](https://www.kaggle.com/moaviaamir)
62+
63+
---
64+
65+
## 🔧 Components
66+
67+
***All components*** <img src=".\images\components.jpg">
68+
69+
- **ESP8266 Module (NodeMCU)**
70+
<img src="https://joy-it.net/files/files/Produkte/SBC-NodeMCU/SBC-NodeMCU-1.png" width="300"/>
71+
72+
_Purpose:_ The heart of the project, the NodeMCU module provides WiFi connectivity, enabling the control of the RC car via commands sent from the web interface.
73+
74+
- **L298N Motor Driver**
75+
<img src="https://components101.com/sites/default/files/components/L298N-Motor-Driver-Module.jpg" width="300"/>
76+
77+
_Purpose:_ The L298N motor driver controls the speed and direction of the DC motors, allowing for precise movement of the RC car. It serves as the interface between the NodeMCU and the motors.
78+
79+
- **DC Motors (4x)**
80+
<img src=".\images\Motors.jpg"/>
81+
82+
_Purpose:_ These four motors provide the necessary movement for the RC car, enabling it to move forward, backward, left, and right.
83+
84+
- **Wheels (4x)**
85+
<img src=".\images\wheels.jpg"/>
86+
87+
_Purpose:_ These wheels, mounted on the DC motors, allow the RC car to drive across various surfaces.
88+
89+
- **Chassis**
90+
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQU8DSvK8b2wW_TD6ZqpkwlIwxVIMhfwJI0AviLfkzuh-Kk4j2-c6K3rzFjzZo7p4xotIg&usqp=CAU" width="300"/>
91+
92+
_Purpose:_ The chassis is the structural frame that holds all the components of the car, including the motors, wheels, and the NodeMCU.
93+
94+
- **Battery Pack (7.4V)**
95+
<img src="https://storage.googleapis.com/wp-static/wp-yokenergy/2022/08/8c875af8-battery-pack-rendering-1-1-1.png" width="300"/>
96+
97+
_Purpose:_ This battery pack powers the RC car and its components, providing the necessary voltage for the motors and electronics to function.
98+
99+
- **Jumper Wires**
100+
<img src=".\images\Jumper_wires.jpg"/>
101+
102+
_Purpose:_ Jumper wires are used for making the necessary electrical connections between the NodeMCU, motor driver, and other components.
103+
104+
- **Smartphone**
105+
<img src=".\images\Phone.Jpg"/>
106+
107+
_Purpose:_ A smartphone is used to interact with the web interface for controlling the RC car via the NodeMCU's WiFi network.
108+
109+
---
110+
111+
## 🛠️ Tools & Technologies
112+
113+
- **NodeMCU ESP8266**
114+
- **L298N Motor Driver**
115+
- **DC Motors**
116+
- **HTML + JavaScript (for UI)**
117+
- **Arduino IDE**
118+
119+
---
120+
121+
## 📌 How to Use
122+
123+
1. Upload the `.ino` file to your NodeMCU.
124+
2. Connect to the WiFi AP `NodeMCU Car`.
125+
3. Open the web interface in your mobile browser.
126+
4. Use directional buttons to control your car.
127+
128+
---
129+
130+
## 🤝 Credits
131+
132+
By **Coding Moves**
133+
Passionately building cool projects that move!
134+
135+
---
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
// By Coding Moves
2+
// WiFi Controlled Car using NodeMCU (ESP8266)
3+
// Project: Coding Moves RC+
4+
5+
#include <ESP8266WiFi.h>
6+
#include <WiFiClient.h>
7+
#include <ESP8266WebServer.h>
8+
9+
// Motor driver pin definitions
10+
#define ENA 14 // Enable/speed motors Right (D5)
11+
#define ENB 12 // Enable/speed motors Left (D6)
12+
#define IN_1 15 // Motor IN1 (Right) (D8)
13+
#define IN_2 13 // Motor IN2 (Right) (D7)
14+
#define IN_3 2 // Motor IN3 (Left) (D4)
15+
#define IN_4 0 // Motor IN4 (Left) (D3)
16+
17+
// WiFi settings
18+
const char* ssid = "Coding Moves RC+";
19+
const char* password = "codingmoves_123";
20+
21+
ESP8266WebServer server(80);
22+
23+
String command; // Command received from mobile app
24+
int speedCar = 800; // Default speed
25+
int speed_Coeff = 3; // Coefficient for turning curves
26+
27+
void setup() {
28+
// Motor pin setup
29+
pinMode(ENA, OUTPUT);
30+
pinMode(ENB, OUTPUT);
31+
pinMode(IN_1, OUTPUT);
32+
pinMode(IN_2, OUTPUT);
33+
pinMode(IN_3, OUTPUT);
34+
pinMode(IN_4, OUTPUT);
35+
36+
Serial.begin(115200);
37+
38+
// Start WiFi access point
39+
WiFi.mode(WIFI_AP);
40+
WiFi.softAP(ssid, password);
41+
42+
IPAddress myIP = WiFi.softAPIP();
43+
Serial.print("AP IP address: ");
44+
Serial.println(myIP);
45+
46+
// Route handling
47+
server.on("/", HTTP_handleRoot);
48+
server.onNotFound(HTTP_handleRoot);
49+
server.begin();
50+
}
51+
52+
// Movement functions
53+
void goAhead() {
54+
digitalWrite(IN_1, LOW); digitalWrite(IN_2, HIGH); analogWrite(ENA, speedCar);
55+
digitalWrite(IN_3, LOW); digitalWrite(IN_4, HIGH); analogWrite(ENB, speedCar);
56+
}
57+
58+
void goBack() {
59+
digitalWrite(IN_1, HIGH); digitalWrite(IN_2, LOW); analogWrite(ENA, speedCar);
60+
digitalWrite(IN_3, HIGH); digitalWrite(IN_4, LOW); analogWrite(ENB, speedCar);
61+
}
62+
63+
void goRight() {
64+
digitalWrite(IN_1, LOW); digitalWrite(IN_2, HIGH); analogWrite(ENA, speedCar);
65+
digitalWrite(IN_3, HIGH); digitalWrite(IN_4, LOW); analogWrite(ENB, speedCar);
66+
}
67+
68+
void goLeft() {
69+
digitalWrite(IN_1, HIGH); digitalWrite(IN_2, LOW); analogWrite(ENA, speedCar);
70+
digitalWrite(IN_3, LOW); digitalWrite(IN_4, HIGH); analogWrite(ENB, speedCar);
71+
}
72+
73+
void goAheadRight() {
74+
digitalWrite(IN_1, LOW); digitalWrite(IN_2, HIGH); analogWrite(ENA, speedCar / speed_Coeff);
75+
digitalWrite(IN_3, LOW); digitalWrite(IN_4, HIGH); analogWrite(ENB, speedCar);
76+
}
77+
78+
void goAheadLeft() {
79+
digitalWrite(IN_1, LOW); digitalWrite(IN_2, HIGH); analogWrite(ENA, speedCar);
80+
digitalWrite(IN_3, LOW); digitalWrite(IN_4, HIGH); analogWrite(ENB, speedCar / speed_Coeff);
81+
}
82+
83+
void goBackRight() {
84+
digitalWrite(IN_1, HIGH); digitalWrite(IN_2, LOW); analogWrite(ENA, speedCar / speed_Coeff);
85+
digitalWrite(IN_3, HIGH); digitalWrite(IN_4, LOW); analogWrite(ENB, speedCar);
86+
}
87+
88+
void goBackLeft() {
89+
digitalWrite(IN_1, HIGH); digitalWrite(IN_2, LOW); analogWrite(ENA, speedCar);
90+
digitalWrite(IN_3, HIGH); digitalWrite(IN_4, LOW); analogWrite(ENB, speedCar / speed_Coeff);
91+
}
92+
93+
void stopRobot() {
94+
digitalWrite(IN_1, LOW); digitalWrite(IN_2, LOW); analogWrite(ENA, 0);
95+
digitalWrite(IN_3, LOW); digitalWrite(IN_4, LOW); analogWrite(ENB, 0);
96+
}
97+
98+
// Handle incoming commands
99+
void loop() {
100+
server.handleClient();
101+
command = server.arg("State");
102+
103+
if (command == "F") goAhead();
104+
else if (command == "B") goBack();
105+
else if (command == "L") goLeft();
106+
else if (command == "R") goRight();
107+
else if (command == "I") goAheadRight();
108+
else if (command == "G") goAheadLeft();
109+
else if (command == "J") goBackRight();
110+
else if (command == "H") goBackLeft();
111+
else if (command == "S") stopRobot();
112+
113+
// Speed levels 0–9
114+
else if (command == "0") speedCar = 400;
115+
else if (command == "1") speedCar = 470;
116+
else if (command == "2") speedCar = 540;
117+
else if (command == "3") speedCar = 610;
118+
else if (command == "4") speedCar = 680;
119+
else if (command == "5") speedCar = 750;
120+
else if (command == "6") speedCar = 820;
121+
else if (command == "7") speedCar = 890;
122+
else if (command == "8") speedCar = 960;
123+
else if (command == "9") speedCar = 1023;
124+
}
125+
126+
// Web server route
127+
void HTTP_handleRoot() {
128+
if (server.hasArg("State")) {
129+
Serial.println(server.arg("State"));
130+
}
131+
server.send(200, "text/html", "");
132+
delay(1);
133+
}
227 KB
Binary file not shown.

CodingMoves-RCPlus/docs/Report.pdf

854 KB
Binary file not shown.

CodingMoves-RCPlus/images/Car.jpg

215 KB
Loading
53.3 KB
Loading
30.7 KB
Loading
19 KB
Loading
237 KB
Loading

0 commit comments

Comments
 (0)