avinabmalla / ESP32_BleSerial

A BLE Serial library for Arduino ESP32
MIT License
67 stars 20 forks source link

ESP32_BleSerial

An easy-to-use BLE Serial library for Arduino ESP32. The class inherits the Arduino Stream class so all the familiar Serial functions are supported.

Installation

Add the files in the src folder to your project, or install using the Arduino library manager.

Features

Usage

The following examples are provided:

Configuration

The library can be set to toggle a pin when a device is connected or disconnected. This can be used for an LED indicator, for example. To enable this feature, pass the LED pin to the begin() function.

The library uses the Nordic BLE Serial profile by default. This can be changed by passing the service, RX and TX characteristic UUIDs to the begin() function. Make sure to not create multiple BLE serials with the same UUIDs.