The default baud rate is 9600 the hc06 requires all at commands to be in. The code should successfully be verified and uploaded. The arduino sketch below will allow you to confgure your hc 06 module using the arduino ide serial monitor. The software serial library comes preinstalled with the latest version of the arduino ide. Connect the hc 06 rxrxd pin to arduino digital pin 2. Hello, i tried many ways from internet that i could find to use at command for changing the baud rate of hc06 bluetooth but nothing seems to work. Hc 06 at commands have no line endings at the end and no spaces between the command name and the input. In this example we will connect one of these modules to our arduino, use the software serial library and using a terminal program send a command via your pc and switch the on board. The data sheet i have claims the hc06s default rate is. At commands were unavailable directly through arduinos uart port i was ating arduino, not the jymcu hc06, key pin up just didnt change anything. The hc06 zs040 expects commands to be in upper case and does not require carriage return and new line \r\n characters.
Arduino bluetooth pin code and name changing using at commands. Jul 31, 2018 the particularity of the hc 05 is that it can be used as a slave module equivalent to hc 06 and as a master module which means that it can pair itself to another device on its own. Theres no response to the at commands on the serial monitor. Free software such as teraterm or putty can be used. Also, i use an arduino nano to do the programming of the hc 05. Can you try using hardware serial instead of software serial and see if that works. Sending data between an arduino or compatible board and a bluetoothequipped device such as an android smartphone or tablet is very easy thanks to the inexpensive hc06 bluetooth module we have in stock at pmd way. You can change the name of the device, the 4digit passcode and everything.
An arduino library for the hc 06 bluetooth module using the bc417 chip. Note there are many sellers on amazon and ebay selling hc 06s as hc. Setup the breadboard circuit with the hc06 and arduino as shown in the above image. First thing you need to do is identify your module. At commands not working for hc06 on arduino uno arduino. The hc06 bluetooth module should start flashing a red light. Tutorial using hc06 bluetooth to serial wireless uart adaptors with arduino. Hc06 bluetooth module getting this sucker into at command. Tutorial configure hc06 bluetooth module using at command.
Once you wire it up and run the program included here you will be able to send any of the hc 05 commands and they work great. There is no getting back involved, tthe hc06 is in at mode by. Tutorial using hc06 bluetooth to serial wireless uart. It was fairly simple to setup but i did run into a few hitches and a lack of information so im going to detail some of that for you so you can hopefully avoid the same pitfalls. I use this type of bluetooth module and a arduino uno. Before using a hc 05 bluetooth module, you must configure the module and pair it with an android phonetablet. The hc06 starts in at command mode on power on and expects commands to be uppercase without line endings so no \r characters.
I want to establish bluetooth communication between pc and arduino. Open the serial monitor and select a baud rate of 9600 and ensure no line ending is selected from the drop down list at the bottom of the window. The hc06 does not have many commands, apart from setting the baud rate and renaming it, there isnt a lot you can do. Hc06 bluetooth module datasheet and configuration with arduino. So heres a program that works for me, that sends an at command and. Tutorial using hc06 bluetooth to serial wireless uart adaptors with arduino step 1. How to use hc 06 bluetooth module for arduino and android. In this lesson, we will show what is hc 06 bluetooth module and how to setup communications between an arduino and a bluetooth device running serial terminal software in this case an android smartphone. How to connect bluetooth module hc06 with arduino uno. The hc 06 starts in at command mode on power on and expects commands to be uppercase without line endings so no \r\n characters.
At command mode of hc 05 and hc 06 bluetooth module. In them we only need to use four for successfully interfacing the module. The pin state determines whether the module works in at command mode or normal mode. Youll need to be sure your softwareserials baud rate matches the hc06s baud rate. Contents1 hc05 bluetooth module2 at command mode3 control a led via bluetooth and android4 connect arduino to pc. In this tutorial, we will create an arduinobluetooth interface and send messages from an arduino to smartphone and arduino to a personal computer. Jan, 2018 arduino and bluetooth with the hc 06 wiring using softwareserial 55 tech explorations. Remember that the hc06 requires commands to be upper case and does not want new lines or carriage returns so set no line endings at the bottom of the serial monitor window.
The hc06 is very similar to the hc05, but crucially initially runs at a different baud rate 9600bps instead of 38400bps. The opensource arduino software ide makes it easy to write code and upload it to the board. The data sheet i have claims the hc 06 s default rate is 9600 baud, but as there are commands to change it, it may not be in its factory condition right now. Some breakout boards will only leave four output pins only because of this reason. The arduino will act as a middleman between the bluetooth module and your computer.
I was unable to get my bluetooth module going, so i combined some other libraries to code my own. As said earlier, you might want to configure the module to setup various things like the device name, pass code, baud rate etc. The pins at this block diagram is as same as the physical one. Hook up the hc 06 bluetooth module to the arduino connect the hc 06 ground gnd pin to ground duh.
At command mode of hc05 and hc06 bluetooth module step 1. Pin connection of arduino uno with bluetooth module hc06 hc06 arduino. Bluetooth is the most popular way of connecting an arduino to a smartphone wirelessly. The first one is writing them directly and second is with serial. Apr 22, 2016 arduino uno hc06 simple example using android phone apr 22, 2016 by justin bauer this post will provide a sample arduino sketch that uses the software uart to communicate to a connected android phone. Arduino bluetooth this is a very basic and yet very important tutorial in which you will learn how to change the name and pin code or password of the bluetooth module using at commands. Arduino nano connecting by bluetooth using a hc05 and hc06. We can do this by using software serial on the arduino. Connect your arduino board to your pc and open arduino software to upload the following code.
Dec 05, 2016 this video will describe how to configure the hc06 bluetooth module using a usb to serial ttl cable together with a serial terminal program. Connect the hc06 rx to the arduino tx on pin 3 through a voltage divider. The environment is written in java and based on processing and other opensource software. It will communicate with your pc over the built in serial connection through the usb cable, and with the hc 06 bluetooth module over pins 4 and 2, using. It doesnt matter whether you are using hc 05 or hc 06 bluetooth module, there is a very little change in the at commands, while the use of both the bluetooth modules is exactly the same. In some devices the one method works, which depend on one of their module and software versions. Hc06 at commands have no line endings at the end and no spaces between the command name and the input. Initially id tried following the documentation for configuring a hc05 module, but after i while i realised it was actually a hc06 module. Arduino board, arduino uno used in this tutorial, other boards should work to. This way we have established a bluetooth link to send messages form the phone to the arduino with hc 05. How to use hc06 bluetooth module for arduino and android. May 25, 2014 the arduino sketch below will allow you to configure your hc 06 module using the arduino ide serial monitor.
You can now enter at mode of hc 05 using an arduino board, arduino uno used in this tutorialupdated july 7. Simple at commands are then used to configure the module to match your project. Arduino uno hc06 simple example using android phone mcuhq. Aug 05, 2017 the arduino pins 0 and 1 are specified for universal asynchronous receivertransmitter uart that control the interface with its attached serial devices. Mar 22, 2014 the module arrived fine, though unsurprisingly without any documentation.
Hc06 bluetooth module datasheet and configuration with. There are various different modules, some of which use the same hardware and look the same but have different firmware and finding out which exact module you have is the key. No user code specific to the bluetooth module is needed at all in the user microcontroller program. Bluetooth module hc06 is not responding to any at command on. It has been developed to allow setting up serial communication on. Refer to the getting started page for installation instructions.
Arduino and hc06 bluetooth example arduino learning. The bluetooth module hc06 allows the serial and uart communication between your arduino uno or any microcontroller with a pc or a smartphone equipped with a bluetooth facility. This makes it only useful for say connecting a notebook as a master to a robot with a slave module e. In this example we will add bluetooth support to our arduino, there are several low cost modules labelled either hc05 or hc06. When sending commands from the serial monitor check that the led connected to the hardware serial is flashing. Create a bluetooth hc06 module with arduino dzone iot.
Arduino can communicate with other device via bluetooth using the. Hc06 modules start in at mode so we can start entering commands as soon as we open the serial monitor. The hc 06 does not have many commands, apart from setting the baud rate and renaming it, there isnt a lot you can do. Configuracion del modulo bluetooth hc06 usando comandos at. In my experience using the hc bluetooth module with the arduino hardware serial, in order to get proper sketch uploads, you must unplug either the power or the txrx of the hc06 from the arduino, otherwise it will interfere. The hc06 firmware on the other hand only can be a slave device, with very limited at commands. For this discussion we will use an arduino uno to configure the hc 05 and pair it with a samsung phone. Connect the hc 06 txtxd pin to arduino digital pin 4. The hc05 module can build a connection to other modules. Reconfiguring the hc06 cheap bluetooth serial module. It doesnt matter whether you are using hc05 or hc06 bluetooth module, there is a very little change in the at commands, while the use of both the. Arduino and bluetooth with the hc06 wiring using softwareserial 55 tech explorations. This video will describe how to configure the hc06 bluetooth module using a usb to serial ttl cable together with a serial terminal program. Main is to do a test jig for operator to test this kind of product.
For most use cases the hc 06 is enough, as typically i want to have a wireless uart connection to my devices from my notebook. May 06, 2019 arduino bluetooth this is a very basic and yet very important tutorial in which you will learn how to change the name and pin code or password of the bluetooth module using at commands. Depending on the microcontroller, some pins may not support serial communication. Hc06 pinout, interfacing with arduino example, applications.
38 770 17 247 980 1017 1473 340 1324 1104 677 1080 1378 423 849 967 546 688 697 79 110 1080 673 1130 943 468 1279 215 599 688 442 759 1413 956 512