HC-02 Bluetooth serial communication module is based on the Bluetooth V2.0 Bluetooth protocol data transmission module, high stability, ultra low power consumption, industrial grade Bluetooth data transmission module.
Users do not need to care about complex wireless communication configuration and transmission algorithms. They only need to connect to devices through TTL serial port. Powered the HC-02 slave module, and can be connected to the mobile phone for data transmission. In addition, it can be used with HC-05 or HC-06 hosts (matching code, default is 1234) to connect, can replace a traditional serial line, save wiring work. It’s very flexible.
If you need to use iPhone or iPad to control your project, hc-02 4.0 ble slave module with 6pin baseboard may be a good choice.Fully compatible with ios7.0 or later.Also compatible with Android 4.3 or later.
In this lesson, we will show what is HC-02 bluetooth module and how to setup communications between an your board and a Bluetooth device running serial terminal software – in this case an Android/iOS smartphone. Please note that the Bluetooth module used in this tutorial is not compatible with iOS devices.
- If the version of the Android OS is less than 4.3. it is not compatible.
- This module supports bluetooth 4.0 ble mode and bluetooth 2.0 mode.
- If you are not so familiar with the Bluetooth, you can get more info about blutooth from here.
info about the HC-02 BLE module please check this link.
In this example, we will show how to use an Smart phone to control the board on-board LED via bluetooth protocol.
Overhere we use the Software serial port of the board, connect them as below fritzing:
After above operations are completed, connect the board to your computer using the USB cable. The green power LED (labelled PWR) should go on.Open the IDE and choose corresponding board type and port type for you project. Then download and unzip the sketch file from https://osoyoo.com/driver/v2.1car/hc02-test.zip. then upload onto your board.
Here are the code details:
#include “SoftwareSerial.h”// import the serial library SoftwareSerial mySerial(10, 11); // RX, TX int ledpin=13; // led on D13 will be turn on / off as per APP input int BluetoothData; // the data given from Computer void setup Serial.begin(9600); Serial.println(“Input letter a or b to turn on/off on board LED in D13!”); // put your setup code here, to run once: mySerial.begin(9600); Serial.println(“please send letter 1 or 0 from HC-05 APP to turn on/off LED.”); pinMode(ledpin,OUTPUT); void loop // put your main code here, to run repeatedly: if (mySerial.available) BluetoothData=mySerial.read; if(BluetoothData’1′) // if letter 1 is sent from APP. digitalWrite(ledpin,1); Serial.println(“LED On D13 ON ! “); if (BluetoothData’0′) // if Letter 0 is sent from APP. digitalWrite(ledpin,0); Serial.println(“LED On D13 Off ! “); delay(100);// prepare for next data.
For Android Smart Phone User
In Google Play, please search Bluetooth Terminal HC-05, you will find a blue color APP. install this APP into your Android Phone. Open your cell phone Setting, pair a Bluetooth device called HC-02. input passcode 1234 to add this device to your cell phone. Now open Bluetooth Terminal HC-05 APP, select the HC-02 device from paired device list. You will see following user interface page:
You can input a letter “a” in the text field and click Send ASCII button, a letter “a” will be sent to bluetooth module and LED in D13 will turn on.
You can input a letter “b” in the text field and click Send ASCII button, a letter “a” will be sent to bluetooth module and LED in D13 will turn off.
For iPhone User
Download the Bluetooth Terminal app from the APP Store.
After the above operation is completed, open the Bluetooth Terminal, and you will see the bluetooth list as below:
Choose “HC-02”, then click the connect button.
In this step, click “Select Characteristic”, you will see a scroll bar below the button, select entries with the beginning of “49535343-8841-43F4-A8D4” for your HC-02 BLE module.
Choose “ASCII”, and you can enter your command here, just press the “Send” button to send your command to the board via bluetooth.
Same as Android APP, you can send a character “1” to bluetooth module and turn on LED in D13. or send a character 0 to turn off LED.
A few seconds after the upload finishes, open the Bluetooth Terminal HC-05 app and connect your Android phone with the HC-02 module, simply send “1” or “0” to turn on / off LED.
At the same time, open your Arduino Serial Monitor (see following picture)
you will see following result.
Note: you must choose the correct Baud rate 9600 in Arduino Serial monitor for your serial monitor, be careful.
Arduino Bluetooth Controlled Projects
Arduino Bluetooth-Controlled Projects are a great way to automate your creative process. By using a simple smartphone app, you can control your projects wirelessly from anywhere in the world! In this guide, we will answer some of the most common questions about Arduino Bluetooth-Controlled Projects. We will provide useful tips and advice on how to get started with your own project. So what are you waiting for? Let’s get started!
Arduino and Its Benefits
Using an Arduino board and an HC-05 Bluetooth module, it’s possible to create a variety of Arduino Bluetooth-Controlled projects. Whether you’re an experienced programmer or just starting out with microcontrollers, the flexibility of Arduino makes it easy to get into programming quickly.
Arduino boards are simple yet powerful tools for building digital applications such as robotics, home automation, remote sensing systems and more.
They feature open source hardware and software, making them accessible to anyone who wants to learn coding and build electronic devices. Plus, they can be programmed using the familiar Arduino integrated development environment (IDE), giving you the ability to write code on your own computer without needing special hardware.
The low cost of Arduino boards also makes them ideal for hobbyists who want to build projects at home. The HC-05 Bluetooth module is a versatile wireless component that allows you to control your Arduino projects from a smartphone or tablet. This opens up new possibilities for making your own remote control devices, connecting devices wirelessly and more.
The combination of Arduino boards and Bluetooth modules make it possible for anyone to build exciting projects which interface with the real world. From robotics to home automation, you’ll be able to create amazing projects quickly and easily with an Arduino board and HC-05 Bluetooth module.
Before starting out on an Arduino project, you need to consider a few things first.
The cost of the components for an Arduino project can vary greatly depending on what you’re making. Simple projects with just a few basic components will be much cheaper than projects that require multiple modules and sensors. Make sure to check before starting your project so you know how much it will cost and plan accordingly.
If you are new to microcontrollers, then buying an Arduino starter kit is a great way to get started. These kits come with all the essential components you need, such as an Arduino board, jumper wires, resistors, LEDs and more. They also usually include instructions and tutorials which make it easy to build your first project quickly.
For more advanced projects, you may want to buy individual parts instead of kits, as this will give you more flexibility in terms of what components you use. You can usually find the parts online at a variety of stores or search for tutorials on Arduino-related websites to see which components are best for your project.
Before starting a project, it’s important to consider your experience level. If you are new to programming and electronics, then it’s best to start with simple projects that don’t require a lot of coding or hardware knowledge. Starting with simple projects is also a great way to learn the basics before moving on to more complex ones.
If you have some experience in programming and electronics, then you may want to try an intermediate project such as an Arduino-controlled robot or home automation system. These types of projects require more coding knowledge but can be very rewarding once completed successfully. 
Best Arduino Bluetooth-Controlled Projects
Now that you have an idea of what Arduino and Bluetooth-Controlled projects are, let’s look at some of the best projects you can make using this combination. In this section, we’ll show you some of the most popular projects and give you ideas for your own.
Bluetooth Controlled Car using Arduino
With this project, you can have complete control over your car with the help of Bluetooth and Arduino. This project relies on a car, Arduino board, smartphone, Li-ion Battery SparkFun Dual H-Bridge motor drivers L298 and LED for its construction.
You can create a simple Bluetooth-based remote control car using the components mentioned above. First, prepare the car by mounting the Arduino and motor drivers on it. Next, establish a circuit for connecting all the components to create a simple power supply system. After that, install your smartphone onto the car and use an app to connect it with the Arduino board via Bluetooth. Finally, write down some code in the Arduino IDE and upload it to your board.
- Use an appropriate Li-ion Battery that can power up both the motors and Arduino board simultaneously.
- Try to use a small car for this project since it will be easier to control and maneuver.
- Make sure your smartphone app is compatible with your Arduino Board before connecting them together via Bluetooth.
- Make sure your code matches the hardware setup of the car so it can perform its functions properly.
- Test out the car after completing each step of building it before assembling all components together. This will help you find potential problems early on and makes it easier to debug.
You also can use nearly any car chassis provided it can fit all the components and also can reach high speeds. Once you have completed the construction process, you can provide more functionality to your Bluetooth-controlled car such as adding lights and sensors for obstacle navigation. Have fun!
Arduino Bluetooth LED Control System
Another popular Arduino project is creating an LED control system using Bluetooth. This project can be used to turn on, off and dim LEDs from your Android smartphone or tablet.
Basically, a Bluetooth platform to an Android application, you can conveniently send instructions directly to hardware modules. On receiving data as “1” the LED blinks and turns off when it’s “0”. This Arduino project is simple yet useful, and requires very few components.
Smartphone-Controlled Arduino 4WD Robot Car
We already covered a Bluetooth controlled car before, this time we will create one that you can control with an Android app.
- Arduino UNO
- HC-06 Bluetooth Module
- 4WD Smart Robot Car Chassis Kit
- SparkFun Dual H-Bridge motor drivers L298
- LED (generic)×4
- Resistor 221 ohm
We can start by connecting the Arduino, motor drivers and HC-06 Bluetooth module as described in our previous guide.
Next, we need to create an Android App that will communicate with the HC-06 Bluetooth Module. This can be done using MIT’s App Inventor 2 platform. With this tool you can design your app by dragging and dropping components into place via a graphical user interface (GUI). The app needs to contain seven different buttons: forward, back, left turn, right turn, stop, increase speed and decrease speed. Each of these buttons should send out a unique character string when pressed which will be used by our Arduino code to move the robot car accordingly.
Once the app is designed and working with the Bluetooth module, we can write the Arduino code to control the robot car. The code should look for a character string from the Bluetooth module, and perform an action based on which button was pressed in the Android app. We can use if-statements to detect which character string is being sent and then move the robot accordingly.
Finally, we can add some additional features such as LED light effects that change when you press each button or a buzzer to indicate when your command has been received.
With this setup, you will be able to control your own 4WD Robot Car using a smartphone!
Autonomous “Follow Me” Cooler Using Arduino
This project is a cool way to show off your Arduino Bluetooth-Controlled skills! It involves creating an autonomous “Follow Me” cooler that will follow you around. The idea here is that the cooler is equipped with a Bluetooth receiver and motors, which can be controlled from a smartphone app.
With the utilization of Arduino and Bluetooth technology, this project seeks to create a Smart cooler that emits cool air with minimal energy consumption. Users can easily access the cooler through GPS and Bluetooth connections.
To get started on this project, you will need some basic items: an Arduino board, motors for the wheels of the cooler, a Bluetooth module or shield, and some mounting hardware for attaching everything together. You will also need an appropriate power source for your device – either batteries or an AC adapter.
Once you have all of these components gathered together and connected, you’ll want to begin programming your Arduino board. You will need to decide on the logic for your device – how it will follow you around and when it should start/stop emitting air. This can be done using Arduino’s “if” statements and programming language.
Next, you will want to use a smartphone app that will allow you to control the cooler from a distance. This app should have features such as starting and stopping the cooler, setting temperature levels, and coordinating the movements of the cooler with GPS data. Once this is complete, you’ll be ready to give your autonomous “Follow Me” cooler a test run!
A Glove That Translates Sign Language Into Text and Speech
Utilizing an accelerometer, we can measure the tilt of a hand. To accomplish this, five bend sensors are placed on a glove – four for each finger and one for the thumb. By leveraging sensors to measure the bend in each finger, thumb, and palm of a user’s hand, the Arduino Nano microcontroller is able to interpret which set of values correspond with which symbol. Once this data is received by an Android app via Bluetooth connection, it displays and speaks symbols that were generated accordingly.
This is a great project as it will enable people to communicate without having to rely on another person’s interpretation of sign language. , , 
How to control LEDs using Bluetooth Arduino?
Controlling an LED using Bluetooth is a simple and fun project. The most important component to this project is the HC-05 Bluetooth module, which allows for wireless communication between two devices.
To start the project, it’s necessary to connect the Bluetooth module to your Arduino board. Once connected, you can use an Android device (or other compatible device) to send data that will control the LED on your Arduino board.
To program the Arduino board, you’ll need to upload a sketch that sets up a serial port connection with your device and then defines how it should react when certain data is received from your device. When specific data is sent from your device such as “1” or “0”, the Arduino board will use this to decide whether or not to turn on the LED.
There are tons of online tutorials and resources that can help you get started with this project. Once it is set up, you will be able to control the LED on your Arduino board from anywhere in the world!
How to build a Bluetooth-controlled home automation system using Arduino?
Building a home automation system using Arduino and Bluetooth is relatively straightforward. The first step is to choose the Arduino board that you would like to use for the project. Several different types of Arduino boards are available, each with its own set of features and capabilities. Once you have chosen your board, you will need to download the necessary software libraries for controlling it over Bluetooth.
The next step is to connect all of the components of your home automation system together. This includes things such as lights, sensors, motors, actuators, and more. Depending on what type of home automation system you would like to build, there may be other components needed as well. Once everything is connected, you can then program your Arduino board using the downloaded software. This programming will enable your Arduino board to communicate with the other components of your home automation system over Bluetooth.
Finally, once everything is programmed and connected, you can begin testing your system. You may want to start by creating some basic commands for controlling devices like lights or motors. Once these commands are working properly, you can then move on to more complex tasks such as scheduling tasks for specific times. After testing your system, you should be ready to use it in real-world applications!
How do I add Bluetooth to my Arduino project?
Adding Bluetooth to an Arduino project can be done in a few simple steps. First, you’ll need to get the appropriate hardware for your Arduino board. This includes a compatible Bluetooth module, such as the HC-05 or HC-06, and any other necessary components such as a power source and capacitor. Once you have all of these components, you will then need to wire them up according to the schematic provided with your module. To connect the Bluetooth module to your Arduino board, use the TX and RX pins of both devices. Once wired up properly, you should be able to use software serial commands through your computer’s serial monitor application to configure the settings of the Bluetooth module. After configuring your connection parameters, you can now start developing applications that make use of the Bluetooth connection.
Arduino is a popular platform for creating Bluetooth-controlled projects, ranging from simple home automation to complex industrial applications. Arduino is also relatively easy to get started with, as it can be used with any compatible microcontroller board and programmed using the integrated development environment (IDE).
In this article, we have discussed some of the most common questions and useful tips for getting started with Arduino Bluetooth-controlled projects. We covered topics such as choosing the right board, connecting components, writing the code to control your project, troubleshooting and debugging issues, and more.
When working on an Arduino Bluetooth-controlled project, there are some important considerations to keep in mind. First and foremost, you should ensure that your device is securely connected to the network before attempting any type of communication. Additionally, it’s important to consider power requirements since most devices require a battery backup or additional power source in order to function properly when not connected directly to a mains supply. Finally, security measures such as encryption should always be taken into account when transmitting data over Bluetooth so that your data remains protected from potential attackers.
By following the steps in this guide, you can get your Arduino Bluetooth-controlled project up and running quickly and easily. With a bit of practice, you’ll soon be creating amazing projects for yourself or for others! Good luck and happy coding!
DFRobot Beetle BLE. The Smallest Board Based on Arduino Uno with Bluetooth 4.0
You have choosen: [[togetherChouseinfo.num]]
Total amount: [[currency]][[togetherChouseinfo.price]] [[togetherChouseinfo.price]][[currency]]
The Beetle Ble (Former name as Bluno Beetle) is a board based on Arduino Uno with Bluetooth 4.0 (BLE). It is probably the smallest BLE board in the market. It uses standard Arduino IDE to upload codes via without any extra library and drivers. This Beetle BLE is another milestone in the Beetle line, which makes DIY users have more options in the project design. It is fully compatible with Bluno in instructions and procedures. Support Bluetooth HID and ibeacon modes. You may also check the Bluetooth microcontroller selection guide to get more information.
The Beetle BLE is a super tiny and low-cost Arduino-compatible board with Bluetooth 4.0. The Beetle BLE can be used for disposable projects, such as DIY projects, workshops, gift projects, E-Textiles wearable, and educational. For students and makers who can not afford too much on hardware purchasing, Beetle can be a great solution for them.
Just like a native Arduino board, but with Bluetooth 4.0. An APP called Play Bluno is available on iOS and Android which gives quick access to this little tiny board. It not only supports USB programming but also wireless uploading method. With the V-shaped gilded I/O interface, it is convenient to screw conductor wire on it, which could a good choice in the wearable market.
- [email protected]
- Bluetooth Low Energy (BT 4.0)
- Micro USB port
- Super Compact Size
- Support Bluetooth HID and ibeacon
- Compatible with all DFRobot Bluno Series
- Support Wireless Programming
I’ve always been dreaming of making a desktop clock without complex functions, just smaller and can display time.
- Gravity I2C OLED-2864 Display
- Gravity: I2C Triple Axis Accelerometer
- Beetle BLE
- Lithium Battery Charger
- 3.7V Polymer Lithium Ion Battery. 1000mA
- Shell (3D printing)
- Black Acrylic Transparent Board
How to Use Bluetooth on the Arduino
In 1996, there were several countries involved in the development of short-range wireless links, and together they wanted some unification of standards and a name that symbolized unity. Intel, Ericsson, and Nokia were involved, and the name Bluetooth was suggested to symbolize unity. In the 10th century, King Harold the Bluetooth was responsible for unifying Scandinavia. The name wasn’t meant to be permanent, but it stuck.
Bluetooth was created to exchange data within short range without the need for wires like headphones, heart monitors, and sensors. It works in the ISM 2.4GHz Band. Data is split into one of 79 slots between 2.4 and 2.4835 GHz in 1MHz bands. Bluetooth LE (Low Energy) was a new version. Unlike the earlier standard Bluetooth, LE requires no contracts or problems with developing apps, and you can distribute via the Play Store; it also requires very little power, so it is very suitable for battery operation.
Arduino Bluetooth Options
While a handful of Arduino boards have Bluetooth built-in, some projects may require the use of external Bluetooth modules. The HC-05 Bluetooth transceiver module is the most common Bluetooth transceiver, but it has high power consumption and can’t be linked to smartphones. Instead we will use the nRF8001 Bluetooth module which has a lower power consumption and can be connected to smartphones.
We are going to connect an Arduino UNO to the nRF8001 module and send and receive data to/from it as though it were a serial port. In other words, we will use the built-in ability to act as a UART. We will add a red, green, and blue LED, and by sending an ‘r’ or ‘b’ or ‘g’, we will pulse that LED for a few mS. We will also type in strings at the serial console, and send these back to the cell phone.
Note: I have only tested all this on an Android phone (Samsung Galaxy J3)
How the nRF8001 Works
One of the cool features of the nRF8001 is that its interface to the user is a UART. In other words, plain old serial Tx and Rx, which makes it very easy to use. The first three pins on the PCB are the SPI interface, SCK is just a clock, MISO is Master In Slave Out, and MOSI is Master Out Slave In. These four pins must go to the Arduino as shown and are not negotiable. REQ signals to the nRF that the Arduino has something to say and RDY tells the Arduino that the nRF has something to say and must go to one of the Arduino’s interrupt request pins, i.e., 2 or 3. RST is the reset pin and resets the nRF at startup. REQ is used similarly to SS that you may have come across in other SPI applications. Adafruit has more details on its nRF8001 here.
How to Connect the nRF8001 to the Arduino
Here are the parts you will need to build this project:
If you want to learn more about the Arduino, check out our Ultimate Guide to the Arduino video course. You’ll learn basic to advanced Arduino programming and circuit building techniques that will prepare you to build any project.
Install the Library
There is only one library required – the SPI library that is automatically installed with the Arduino IDE. But if you don’t have it, you can download it here.
You will also need to download and install Nordic’s Android nRF UART 2.0 application from the Play Store on your Android phone. I don’t have an iPhone to test it, but it should work on Apple devices too.
Notes on the Program
Although the nRF8001 is a 3.3V device, the Vcc and data pins are 5V tolerant so you can use either. The sketch to demonstrate the project is based on the example provided in the library under “examples” as “echodemo”. Once you have loaded the design and opened the serial window, you should see something like this on your cellphone:
Type in some text and hit the Send button. The text should appear in the Arduino’s serial monitor. Enter text on the serial window and send it, and it will appear on your phone.
In the modified example below, I have added a red, green, and blue LED to the board, and you can flash these by entering an r, or b or g from the phone. Typing a word with all three such as “grab” will flash all three. My phone is an older Samsung Galaxy and worked just fine.
Once the circuit is connected, upload this code to the Arduino:
//an adaptation of the “echodemo” example in the library examples folder #include #include “Adafruit_BLE_UART.h” //On UNO compatible: CLK = 13, MISO = 12, MOSI = 11 #define BLE_REQ 10 #define BLE_RDY 2 // This should be an interrupt pin, on Uno thats #2 or #3 #define BLE_RST 9 Adafruit_BLE_UART BTLE = Adafruit_BLE_UART(BLE_REQ, BLE_RDY, BLE_RST); #include #define BL_ON 1 #define BL_OFF 0 #define ADDRESS 0x38 LiquidCrystal_I2C lcd(ADDRESS, 16, 2); // set the LCD I2C address byte blueLED = 3; byte redLED = 5; byte greenLED = 4; aci_evt_opcode_t laststatus = ACI_EVT_DISCONNECTED; void setup(void) lcd.init; // initialize the lcd lcd.setBacklight(BL_ON); lcd.setCursor(0,0); //col, row lcd.print(“Bluetooth tests “); Serial.begin(9600); Serial.println(F(“Bluefruit LE nRF8001 UART demo”)); BTLE.setDeviceName(“Arduino”); / 7 characters max! / BTLE.begin; pinMode(blueLED, OUTPUT); pinMode(redLED, OUTPUT); pinMode(greenLED, OUTPUT); //pre test flash LEDs: digitalWrite(redLED, HIGH); delay(200); digitalWrite(redLED, LOW); delay(200); digitalWrite(greenLED, HIGH); delay(200); digitalWrite(greenLED, LOW); delay(200); digitalWrite(blueLED, HIGH); delay(200); digitalWrite(blueLED, LOW); delay(200); void loop // Tell the nRF8001 to do whatever it should be working on. BTLE.pollACI; // Ask what is our current status aci_evt_opcode_t status = BTLE.getState; // If the status changed. if (status != laststatus) // print it out! if (status ACI_EVT_DEVICE_STARTED) Serial.println(F(“Advertising started”)); if (status ACI_EVT_CONNECTED) Serial.println(F(“Connected!”)); if (status ACI_EVT_DISCONNECTED) Serial.println(F(“Disconnected or advertising timed out”)); // OK set the last status change to this one laststatus = status; if (status ACI_EVT_CONNECTED) // Lets see if there’s any data for us! if (BTLE.available) Serial.println; Serial.print(BTLE.available); //gets number of bytes available Serial.println(F(” bytes available from BTLE”)); // OK while we still have something to read, get a character and print it out //lcd.clear; lcd.setCursor(0,1); //col, row while (BTLE.available) char c = BTLE.read; Serial.print(c); lcd.write(c); if(c ‘r’) digitalWrite(redLED, HIGH); delay(800); digitalWrite(redLED, LOW); if(c ‘g’) digitalWrite(greenLED, HIGH); delay(800); digitalWrite(greenLED, LOW); if(c ‘b’) digitalWrite(blueLED, HIGH); delay(800); digitalWrite(blueLED, LOW); if(c ‘c’) lcd.setCursor(0,1); //col, row lcd.print(” “); //clear 2nd line // Now see if we have any data from Arduino keybd/Serial console if (Serial.available) // Read a line from Serial Serial.setTimeout(100); // 100 millisecond timeout String s = Serial.readString; // We need to convert the line to bytes, no more than 20 at this time byte sendbuffer; s.getBytes(sendbuffer, 20); char sendbuffersize = min(20, s.length); Serial.print(F(“\nSending.\””)); Serial.print((char )sendbuffer); Serial.println(“\””); // write the data: BTLE.write(sendbuffer, sendbuffersize);
Output of the Serial Monitor
Now open the serial monitor and you should see
Thanks for reading and be sure to let us know if you have any questions in the comment section below.