Serial.println("***AT commands mode***") MyBlue.begin(38400) //Baud Rate for AT-command Mode.
Now upload this code on your board and set commands using Serial Monitor. The default baud rate to enter At-command mode is 38400. Some modules have a push button in their packages and there is no need to add one anymore. Otherwise, it works in the communication mode. Sending AT-Commands to HC05 Bluetooth Module and Changing Its Settingsīy pressing and holding the button the module switches into AT-command mode. Reading serial data and Turning LEDs On/Off accordingly.
Software definition for serial pins RX2 & TX3 MyBlue.begin(9600) Ĭonfiguring software serial baud rate at 9600 void loop() Library you need for software serial communication. Let’s take a deeper look at the code and see what each line means: #include "SoftwareSerial.h" Serial.println("Ready to connect\nDefualt password is 1234 or 000")
Communication name is HC05, the password is 1234 or 0000 and the transfer baud rate is 9600 by default. Now for start transferring data, upload this code on your Arduino and connect HC05 using the app you have just installed. In order to communicate with HC05 using Bluetooth, you need a Bluetooth terminal application on your phone. If they aren’t connected, only blue one blinks every 2 seconds. When master and slave are connected, blue and red LEDs on the board blink every 2seconds.
You can read this and other amazing tutorials onElectroPeaks official website In this tutorial, you will learn how to communicate and send data with Bluetooth. Under Configure smart host authentication settings, click the None option, and then click Next. In the 'Add smart host' dialog box, enter in the Fully qualified domain name field. In order to prevent the module from damages and make it work properly, you should use a resistance division circuit (5v to 3.3v ) between arduino TX pin and module RX pin. Learn how to communicate and send data over Bluetooth using an HC-05 module and an Arduino board. Under Network settings, click the Route mail through the following smart hosts option. Supplying 5V to the module can cause damage to the module. But we strongly recommend 3.3V voltage, since the logic of HC05 serial communication pins is 3.3V. HC05 module has an internal 3.3v regulator and that is why you can connect it to 5v voltage. Working voltage: 3.6V – 5V Internal antenna: Yes Automatic connection to the last device: Yes HC05 Bluetooth module important specifications: HC05 module is a Bluetooth module using serial communication, mostly used in electronics projects. There are several ways for wireless communication such as NRF, ZigBee, Wi-Fi, and Bluetooth.īluetooth protocol an affordable communication method in PAN network, with a maximum data rate of 1Mb/S, working in a nominal range of 100 meters using 2.4 G frequency is a common way of wireless communicating.