

Toggling an I/O such as an LED, Relay, Motor, etc can be added to the code. You can optionally comment out the Arduino bluetooth text if you just want the Arduino to echo back whatever data was received Expanding the Demo

#ARDUINO BLUETOOTH HOST SOFTWARE#
I used the software UART on the Arduino since the bitrate for the bluetooth module is low at 9600 baud plus it frees up the hardware UART for optional debugging from your PC. There is no need to modify these settings unless otherwise required. Upon default, the HC-06 powers on with the following default settings:īaud rate:9600N81, ID: linvor, Password:1234
#ARDUINO BLUETOOTH HOST SERIAL#
The Bluetooth module adheres to the "Serial Port Profile" (SPP), which means it can communicate to a connected device just like any other normal serial port. The module can be easily connected to the Arduino via its 2 RX/TX pins on the software UART. The following commands are recognized: Command The HC-06 is an extremely limited device and can only acknowledge a few configuration commands. The HC-06 can operate in slave mode only, meaning it can only receive and send data to once connected device. It has an approximate range of 30 meters. It requires ~40mA during pairing and 8mA in all other cases. The HC-06 abides by the Bluetooth class 2 power level consumption. A host device such as the PIC16F1829 can easily communicate with the HC-06 using a TTL serial communication. It is manufactured by Guangzhou HC Information Technology Co., Ltd. The HC-06 is a hardware device that encapsulates a microcontroller running the Bluetooth software stack as well as a 2.4GHz antenna. They can be purchased on Amazon for only $9 or so. The total time to complete this tutorial should not take longer than 20 minutes assuming you already have and HC-06 or HC-05 bluetooth module.
#ARDUINO BLUETOOTH HOST ANDROID#
The Android phone will be using a simple terminal app to receive and transmit data to the arduino. Bluetooth LE HID host demo ? (IDFGH-855) This post will provide a sample Arduino sketch that uses the software UART to communicate to a connected Android phone. Both regular HID (create a mouse, keyboard etc) and host (connect to a mouse, keyboard etc). Non of the small UART BT and BLE devices have this. The small joysticks use the HID protocol and to connect, the main device needs to run a HID host firmware.
