The HC-05 Bluetooth module is a popular and widely used wireless communication module for microcontroller-based projects, such as Arduino, Raspberry Pi, and other embedded systems. It's designed to facilitate wireless communication over short distances typically within a range of about 10 meters using Bluetooth technology (Bluetooth 2.0).
Here’s a quick overview of the HC-05 Bluetooth module:
#include <SoftwareSerial.h> // Create software serial port SoftwareSerial BTSerial(10, 11); // RX, TX pins void setup() { // Start serial communication Serial.begin(9600); BTSerial.begin(9600); // HC-05 default baud rate Serial.println("Bluetooth communication started!"); } void loop() { // Read data from Bluetooth and send to Serial Monitor if (BTSerial.available()) { char receivedChar = BTSerial.read(); Serial.print(receivedChar); } // Read data from Serial Monitor and send to Bluetooth if (Serial.available()) { char inputChar = Serial.read(); BTSerial.print(inputChar); } }
You can configure the HC-05 module using AT commands. This allows you to change its name, pairing password, and other settings. To enter AT mode, the HC-05 must be powered on and connected to a serial interface, then you can use a serial terminal to send commands.
Origin: China
Brand: Generic