logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

Let’s Play with ESP-WROOM-32 on Arduino (Bluetooth-BLE Connection)

DevicePlus Editorial Team
Published by DevicePlus Editorial Team at March 24, 2020
Categories
  • Arduino
Tags
Difference between Bluetooth and BLE

This article was translated to English, and was originally published for deviceplus.jp.

In this article, we’ll use the Bluetooth (BLE) function to connect ESP-WROOM-32 with other devices.

Today’s Electronic Recipe
Estimated time to complete: 60 minutes
Parts needed
・ESP-WROOM-32 development board

Table of Contents
1. What is Bluetooth?
2. Difference between Bluetooth and BLE
3. Preparation for Use of BLE with ESP-WROOM-32
4. Operation of Sample Program
5. Conclusion

1. What is Bluetooth?
device connected with bluetooth

A variety of recent devices support Bluetooth communication, including earphones/headphones, speakers, car audio systems, mice, keyboards, etc. Though not the same as wireless communication such as Wi-Fi, Bluetooth communication is a relatively familiar communication method for those who use it frequently.

In the first place, what kind of communication is Bluetooth? You may have the impression that with Bluetooth you can connect nearby things but can’t communicate with distant things. Let’s quickly learn the mechanism and specifications of Bluetooth.

Bluetooth
Bluetooth is a wireless technology standard used for exchanging data between fixed and mobile devices over short distances using short-wavelength UHF radio waves in the industrial, scientific and medical radio bands, from 2.400 to 2.485 GHz, and building personal area networks (PANs). It was originally conceived as a wireless alternative to RS-232 data cables.

Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which has more than 35,000 member companies in the areas of telecommunication, computing, networking, and consumer electronics. The IEEE standardized Bluetooth as IEEE 802.15.1, but no longer maintains the standard. The Bluetooth SIG oversees development of the specification, manages the qualification program, and protects the trademarks. A manufacturer must meet Bluetooth SIG standards to market it as a Bluetooth device. A network of patents apply to the technology, which are licensed to individual qualifying devices. As of 2009, Bluetooth integrated circuit chips ship approximately 920 million units annually.
[Adapted from Wikipedia] https://en.wikipedia.org/wiki/Bluetooth

As described in Wikipedia, Bluetooth is basically a short-range wireless communication standard intended to be used in digital devices.

Method of Recognition and Connection
Bluetooth requires the steps of “pairing” and “connection” when using it. For wireless LAN, it is common to connect to an access point by entering a password. For Bluetooth, however, a process is required in which one device detects and registers (authenticates) another device.

How the pairing works

What is Pairing?
You need to set up pairing first, for example, if you want to use your smartphone and headphones with Bluetooth. It’s like a ceremony of face-to-face to allow relevant devices to connect to each other (that is, authentication registration). If the Bluetooth mechanism lacked this ceremony, similarly to wireless LAN, music played on B’s smartphone could be played on A’s headphones when B connects a smartphone with A’s headphones with password authentication while A uses the headphones. To prevent such problems, Bluetooth provides a mechanism that authenticates and registers devices, and allows only registered devices to be connected when using them.
So, for Bluetooth devices, basically only one connection can be established at the same time per Bluetooth module.

2. Difference between Bluetooth and BLE

Have you ever seen the notation “BLE” with Bluetooth? BLE is a type of Bluetooth. Some communications are made with BLE depending on the type and use of the device. BLE, an acronym for Bluetooth Low Energy, is a communication method that assumes devices that can be used with reduced power consumption compared to normal Bluetooth.

The difference between Bluetooth and BLE is the communication speed and power consumption. Some applications send relatively large amounts of data, like Bluetooth headphones or other devices that need to send audio data. BLE isn’t suitable for them, since communication speed and power consumption are required to some extent, unlike ordinary text information. On the other hand, BLE is suitable for data such as the power ON / OFF state or other data that can be simply expressed with text or numbers. (* BLE sometimes doesn’t need pairing)

Difference between Bluetooth and BLE

The ESP-WROOM-32 module supports BLE communication, so let’s use it now.

3. Preparation for Use of BLE with ESP-WROOM-32

Now let’s use BLE with ESP-WROOM-32. We built the environment in Part 69, but BLE communication cannot be provided with Arduino based on that alone. Download and deploy the required files.

Github for this project

Required files – ESP-BLE-Arduino
https://github.com/nkolban/ESP32_BLE_Arduino/tree/98cd2290d036a4e27db061a76a512b526ef1cc14

Download the files (zip file) from “Clone or download” on the page and save them in the libraries/BLE directory of the Arduino installation as in the previous procedure.

Download files

Deploy the downloaded files under the libraries/BLE directory.

Restart Arduino IDE after installing these files, and sketch examples are created in ESP BLE Arduino. If you can see them, you’re ready.

BLE client

4. Operation of Sample Program

Next, we’ll operate ESP-WROOM-32 as a Bluetooth device. Open the “BLE_client” program from “File”-“Examples”-“ESP32 BLE Arduino” and write the program on the board.

Once the program has been written, it is started as a BLE client (BLE work according to a server–client concept, which will be explained in a subsequent Part).

Enable Bluetooth on your smartphone or other device to detect surrounding devices, the ESP-WROOM-32 terminal should successfully be displayed.

Settings on the phone

Conclusion

Now, you’re ready to use ESP-WROOM-32 as a BLE device. You can use this to operate ESP-WROOM-32 from a smartphone or other device and send data from ESP-WROOM-32 to a smartphone with the BLE communication function.

DevicePlus Editorial Team
DevicePlus Editorial Team

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • ESP-WROOM-02 Setup GuideESP-WROOM-02 Setup Guide
  • Let’s Play with ESP-WROOM-32 on Arduino (Environment Construction Setup – LED Blinking)Let’s Play with ESP-WROOM-32 on Arduino (Environment Construction Setup – LED Blinking)
  • nRF24L01+How to Use the NRF24l01+ Module with Arduino
  • The Basics of Arduino Electronics: Controlling the MotorThe Basics of Arduino Electronics: Controlling the Motor
  • How to Make a Pokemon Go Egg Hatching Car Using ArduinoHow to Make a Pokemon Go Egg Hatching Car Using Arduino
  • How to control an Arduino from a Windows computerHow to control an Arduino from a Windows computer
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2023. Device Plus - Powered by ROHM
© 2023 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort