Загрузка...

How to Interface HC-05 Bluetooth Module with Arduino (Step-by-Step)

In this video, you’ll learn how to interface the HC-05 Bluetooth module with Arduino step by step. We explain what the HC-05 module is, how it works, its pins, operating modes, baud rates, and logic levels, and then build a real-world project to control an AC bulb wirelessly using a mobile phone.

The HC-05 is a popular Bluetooth-to-Serial (UART) module that allows Arduino projects to communicate wirelessly with smartphones, laptops, and other microcontrollers. This tutorial covers Data Mode vs AT Command Mode, Slave and Master roles, pairing process, wiring precautions, and safe voltage level shifting.

Finally, we write and explain the Arduino code that receives Bluetooth commands and controls a relay module in real time.

Topics covered in this video:

✅ What is HC-05 Bluetooth module
✅ HC-05 Bluetooth working principle
✅ HC-05 pins and power requirements
✅ Data Mode vs AT Command Mode
✅ HC-05 Slave and Master modes
✅ HC-05 baud rates and logic levels
✅ Interfacing HC-05 with Arduino Uno
✅ Controlling AC appliances using Bluetooth
✅ Android Bluetooth Serial Terminal app
✅ Relay control using Arduino

Code Used In This Video:

// GPIO where relay is connected
const int relayPin = 13;

// Handle received messages
String message = "";

void setup() {
// Start hardware serial communication
Serial.begin(9600);

// Initialize relay pin as output
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH); // Relay OFF initially

Serial.println("Initializing...");
Serial.println("The device started, now you can pair it with bluetooth!");
}

void loop() {
// Check if data is available on hardware serial
if (Serial.available()) {
char incomingChar = Serial.read();

// Build message until newline character
if (incomingChar != '\n') {
message += incomingChar;
} else {
message = "";
}

}

// Check received command and control relay
if (message == "on") {
digitalWrite(relayPin, LOW); // Turn relay ON
}
else if (message == "off") {
digitalWrite(relayPin, HIGH); // Turn relay OFF
}

delay(20);
}

⚠️ Warning: This project involves high-voltage AC wiring. If you are not experienced, please seek professional assistance.

📌 Next Video: HC-05 AT Commands explained in detail.

👍 If you found this video helpful, don’t forget to LIKE, SHARE, and SUBSCRIBE to Electro Nerds Academy for more Arduino and electronics tutorials.

#hc05 #arduino #ArduinoBluetooth #HC05Bluetooth #arduinotutorials
#bluetoothmodule #arduinoprojects #electronics #relay #wirelesscontrol
#embeddedsystems #electronicstutorials #electronerdsacademy #homeautomation

Видео How to Interface HC-05 Bluetooth Module with Arduino (Step-by-Step) канала Electro Nerds Academy
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять