EasyManuals Logo

SunFounder ESP32 User Manual

Default Icon
771 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #138 background image
SunFounder ESP32 Starter Kit
(continued from previous page)
}
}
Depending on the button value, the appropriate function is called. If a number button is pressed,
the count variable is updated, and the detectPoint function is called to detect if the input
number is correct. The lcdShowInput function is called to show the input number and the
upper and lower limit tips on the LCD screen.
If the POWER button is pressed, the initNewValue function is called to generate a new lucky
point number and show the welcome message on the LCD screen.
If the CYCLE button is pressed, the detectPoint function is called to detect if the input number
is correct. The lcdShowInput function is called to show the input number and the upper and
lower limit tips on the LCD screen.
7. Bluetooth&SD Card&Camera&Speaker
1.38 7.1 Bluetooth
This project provides a guide to develop a simple Bluetooth Low Energy (BLE) serial communication application using
the ESP32 microcontroller. The ESP32 is a powerful microcontroller that integrates Wi-Fi and Bluetooth connectivity,
making it an ideal candidate for developing wireless applications. BLE is a low-power wireless communication protocol
that is designed for short-range communication. This document will cover the steps to set up the ESP32 to act as a BLE
server and communicate with a BLE client over a serial connection.
About the Bluetooth Function
The ESP32 WROOM 32E is a module that integrates Wi-Fi and Bluetooth connectivity into a single chip. It supports
Bluetooth Low Energy (BLE) and Classic Bluetooth protocols.
The module can be used as a Bluetooth client or server. As a Bluetooth client, the module can connect to other Bluetooth
devices and exchange data with them. As a Bluetooth server, the module can provide services to other Bluetooth devices.
The ESP32 WROOM 32E supports various Bluetooth profiles, including the Generic Access Profile (GAP), Generic
Attribute Profile (GATT), and Serial Port Profile (SPP). The SPP profile allows the module to emulate a serial port over
Bluetooth, enabling serial communication with other Bluetooth devices.
To use the Bluetooth function of the ESP32 WROOM 32E, you need to program it using an appropriate software
development kit (SDK) or using the Arduino IDE with the ESP32 BLE library. The ESP32 BLE library provides a
high-level interface for working with BLE. It includes examples that demonstrate how to use the module as a BLE
client and server.
Overall, the Bluetooth function of the ESP32 WROOM 32E provides a convenient and low-power way to enable wireless
communication in your projects.
Operation Steps
Here are the step-by-step instructions to set up Bluetooth communication between your ESP32 and mobile device using
the LightBlue app:
1. Download the LightBlue app from the App Store (for iOS) or Google Play (for Android).
132 Chapter 1. For Arduino User

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the SunFounder ESP32 and is the answer not in the manual?

SunFounder ESP32 Specifications

General IconGeneral
BrandSunFounder
ModelESP32
CategoryController
LanguageEnglish