RGB LED is the abbreviation of ‘’Red Green Blue Light Emitting Diode’’. RGB LED is the most amazing type of LED which has the ability to create millions of different shades of light colors using red, green, and blue colors.
HC-05 Bluetooth module is used for wireless communication. It is designed to replace the wired connection. It requires a wireless serial connection setup to communicate with devices. HC-05 Bluetooth module can be operated in master or slave configuration. It uses serial port UART to communicate with devices. It can communicate with devices maximum range up to 10 meters with data transfer rate up to 1 Mbps. Because of its amazing features, it used in multiple applications such as home automation, wireless robot, industrial control units, wireless mouse, GPS receivers, etc.
Pin description:

The HC-05 Bluetooth module has 6 pins which are as follows:
EN: If EN pin is high then it operates under AT commands mode otherwise operates under by default data mode. In data mode, only the data can be exchanged among devices with a baud rate of 9600 bps. On the other side in the AT command mode, the setting of HC-05 can be changed according to the need with the baud rate of 38400 bps.
VCC: power supply pin can be connected with 3.3-volt or 5-volt voltage pin of the Arduino board.
GND: Used for ground connections.
TXD: used to transmit serial data.
RXD: used to receive serial data.
STATE: It used to provide the connectivity status whether the Bluetooth module is connected or not.
In this tutorial, I will explain to you a very basic example which will help you to understand the Bluetooth module connectivity with Arduino Uno. In this example, I will operate an LED with the help of my mobile with a wireless connection. I will use the “Arduino Bluetooth controller app” to control the LED operation.
1. 1 x Bluetooth module HC-05:..........................BUYRequired Hardware components:
2. 1 x Arduino Uno..............................................BUY
3. 1 x LED............................................................BUY
4. 1 x Android mobile...........................................BUY
5. 1 x 220-ohm resistor.........................................BUY
6. Few jumper wires.............................................BUY
Required software components:
- Arduino IDE
- Arduino Bluetooth controller app: Download from here
Circuit connection:
HC-05 Bluetooth module has 6 pins. VCC pin of the Bluetooth module is connected with the 5-volt power supply pin of the Arduino Uno board. GND pin of Bluetooth module is connected with GND pin of Arduino. TXD pin is connected with pin 0 (RX) and RDX pin is connected with pin 1 (TX) of the Arduino Uno board. LED has two legs one is shorter and the other one is longer. The shorter leg (cathode) is connected with the ground pin of Arduino. The longer leg (anode) is connected with 220 resistor’s one end terminal. The other terminal of 220 resistor is connected with digital pin 8 of the Arduino Uno board. This was all about the circuit connection.
Circuit diagram:
Code: Click here
The code allows us to control the LED connected to pin 8, by pressing the 1 or 0. If 1 is entered by the app’s terminal keyboard than LED gets turned on. In the same manner, if ‘0’ is entered by the app’s terminal keyboard than LED gets turned off.
Arduino Bluetooth controller app’s important points:
- Install the app from the Google play store.
- Next turn on your phone’s Bluetooth.
- Select add a device option.
- Than search HC-05 from paired devices list and add it.
- You will ask for password then enter the default password 1234/0000 and get connected to it.
- Now you are ready to use the terminal to control Arduino Uno.
Ufunticonf_ga Doug Isman https://colab.research.google.com/drive/1wEjLOHdkvDMFfFhCkMSFUSEW8RJB94QW
ReplyDeleteclick
download
click here
raiswitalde