Project Work
Project Work
Components Needed:
-
Arduino Uno (or Nano)
-
L298N Motor Driver
-
2 DC Motors + Wheels
-
Robot chassis
-
HC-05 Bluetooth module
-
Jumper wires
-
Battery (7–12V)
-
Android phone
🧠 How It Works
-
You speak into your phone.
-
A voice control app converts speech → text.
-
The app sends command via Bluetooth.
-
Arduino receives command.
-
Motors move accordingly.
🔌 Wiring Overview
1️⃣ Bluetooth (HC-05)
-
VCC → 5V
-
GND → GND
-
TX → Arduino RX
-
RX → Arduino TX (use voltage divider)
2️⃣ Motor Driver (L298N)
-
IN1 → Arduino pin 8
-
IN2 → Arduino pin 9
-
IN3 → Arduino pin 10
-
IN4 → Arduino pin 11
-
Motors connected to OUT1, OUT2
-
Battery to 12V input
Coding :-
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
if (Serial.available()) {
command = Serial.read();
if (command == 'F') { // Forward
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
else if (command == 'B') { // Backward
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
}
else if (command == 'L') { // Left
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
else if (command == 'R') { // Right
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
}
else if (command == 'S') { // Stop
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}
}
}
Simple Talking Robot
Components:
-
Arduino (Uno/Nano)
-
DFPlayer Mini (MP3 module)
-
Micro SD card
-
Speaker (3W)
-
Push button (optional)
-
Battery
#include "SoftwareSerial.h"#include "DFRobotDFPlayerMini.h"SoftwareSerial mySerial(10, 11);DFRobotDFPlayerMini myDFPlayer;void setup() {mySerial.begin(9600);Serial.begin(9600);if (!myDFPlayer.begin(mySerial)) {while(true);}myDFPlayer.volume(20); // Set volume (0-30)myDFPlayer.play(1); // Play 0001.mp3}void loop() {}

Comments
Post a Comment