Interfacing HC-06 Bluetooth Wireless Module With Arduino
Maybe your like
Contents
- Communication
-
Written by Mohammad Damirchi
HC-06 Bluetooth Module Features
Bluetooth modules are a type of wireless communication modules that can be added to a project through the serial or SPI communication protocols.
The advantage of using Bluetooth modules is that they are easy to set up and use.
The HC-06 module uses serial protocol for communication.
Note
All Bluetooth modules that use the serial communication protocol, support AT Commands, which are listed in the datasheet of each product.
Download the datasheet of HC-06 module here.
HC-06 Bluetooth Module Datsheet
1 file(s) 756.96 KB DownloadHC-06 Bluetooth Module Pinout
This module has 6 pins:
- VIN: Module power supply – 3.6-6V
- GND: Ground
- STATE: Connection State
- EN: Enable AT Command settings
- RX: Receive Serial Data
- TX: Transmit Serial Data
You can see the pinout of this module here.
Required Material
Hardware component
| Arduino UNO R3 | × | 1 |
| HC-06 Bluetooth Serial Wireless Module | × | 1 |
| Male to Female jumper wire | × | 1 |
Software Apps
| Arduino IDE |
Interfacing HC-06 Bluetooth Module with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to HC-06 module. Connect wires accordingly.
Step 2: Library
Install the following library on your Arduino IDE.
https://github.com/PaulStoffregen/SoftwareSerial
Tip
If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library
Step 3: Code
Upload the following code to the Arduino board.
/* Modified on March 09, 2021 Modified by MohammedDamirchi from https://github.com/PaulStoffregen/SoftwareSerialHome*/ #include <SoftwareSerial.h> SoftwareSerial mySerial(10, 11); // RX, TX void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } // set the data rate for the SoftwareSerial port mySerial.begin(9600); } void loop() { // run over and over if (mySerial.available()) { Serial.write(mySerial.read()); } if (Serial.available()) { mySerial.write(Serial.read()); }
This code is to test the connection between the Arduino serial monitor and the device connected to the Bluetooth module.
Liked What You See? Get Updates And Learn From The Best SubscribeLeave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Be The First To Know
Subscribe Subscribe to receive monthly life-changing updates Tag » Arduino Hc-06 Serial Monitor
-
Arduino And Bluetooth Module HC-06 - AranaCorp
-
Interfacing The HC-06 Bluetooth Module With Arduino
-
Configuring HC-06 To Send Data To Serial Monitor - Arduino Forum
-
Arduino Uno HC-06 AT Commands Not Working - Project Guidance
-
Bluetooth & HC-06: Unreadable Serial Output - Arduino Forum
-
Reliable Data Transfer With Arduino And HC-06 Module
-
Changing HC-06 Module Baud Rate Via Arduino Uno Code (not Via ...
-
Arduino And Bluetooth With The HC-06 Wiring Using SoftwareSerial 5/5
-
Tutorial - Using HC06 Bluetooth To Serial Wireless UART Adaptors ...
-
HC-06 Bluetooth Module Datasheet And Configuration With Arduino
-
Bluetooth HC-06. Arduino. Send. Receive. Send Text File. Multitouch ...
-
Bluetooth Arduino And Serial Monitor Not Working - Stack Overflow
-
Setting Up & Checking A Bluetooth HC-06 Module - DropController
-
Learn Coding With Arduino IDE – HC-06 Bluetooth Module