0% found this document useful (0 votes)
405 views3 pages

HC-05 Bluetooth Module Interfacing With ARM MBED - MBED

The document describes interfacing an HC-05 Bluetooth module with an ARM MBED microcontroller board. The HC-05 communicates with microcontrollers using serial communication and its default settings can be changed with AT commands. It has a 3.3V TX/RX voltage level, so the TX voltage must be shifted to a level the microcontroller can detect. The example program transmits any character received via Bluetooth from a smartphone terminal app to toggle an LED on the mbed board.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
405 views3 pages

HC-05 Bluetooth Module Interfacing With ARM MBED - MBED

The document describes interfacing an HC-05 Bluetooth module with an ARM MBED microcontroller board. The HC-05 communicates with microcontrollers using serial communication and its default settings can be changed with AT commands. It has a 3.3V TX/RX voltage level, so the TX voltage must be shifted to a level the microcontroller can detect. The example program transmits any character received via Bluetooth from a smartphone terminal app to toggle an LED on the mbed board.

Uploaded by

Krishanu Modak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HC-05 Bluetooth Module Interfacing with ARM MBED

HC-05 Bluetooth Module

HC-05 is a Bluetooth device used for wireless communication with Bluetooth enabled devices (like smartphone). It
communicates with microcontrollers using serial communication (USART).

Default settings of HC-05 Bluetooth module can be changed using certain AT commands.

As HC-05 Bluetooth module has 3.3 V level for RX/TX and microcontroller can detect 3.3 V level, so, there is need to shift TX
voltage level of HC-05 module to microcontroller.

For more information about HC-05 Bluetooth module and how to use it, refer the topic HC-05 Bluetooth module.

Interfacing Diagram
Interfacing HC-05 Bluetooth Module with ARM MBED

Note: Default Bluetooth name of the device is “HC-05” and default PIN (password) for connection is either “0000” or “1234”.

Example

Here, we will transmit any character or string from Smartphone via Bluetooth to the ARM MBED and toggle the LED1 of mbed
board.

Download and install a Bluetooth terminal application on your phone and use it to connect to the HC-05 Bluetooth module.

Data is sent from the Smartphone using the Bluetooth terminal application.

Program
#include "mbed.h"

Serial pc(USBTX, USBRX);

#if defined(TARGET_LPC1768)

Serial blue(p9, p10); // TX, RX

//Serial blue(p13, p14); // TX, RX

#elif defined(TARGET_LPC4330_M4)

Serial blue(P6_4, P6_5); // UART0_TX, UART0_RX

//Serial blue(P2_3, P2_4); // UART3_TX, UART3_RX

#endif

DigitalOut myled(LED1);

DigitalOut myled4(LED4);

int main()

blue.baud(115200);

pc.baud(115200);

pc.printf("Bluetooth Start\r\n");

// echo back characters and toggle the LED

while (1)

if (blue.readable())

pc.putc(blue.getc());

myled = !myled;

if (pc.readable())

blue.putc(pc.getc());

myled4 = !myled4;

You might also like