| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S3 |
|---|
This example shows how to create a GATT service with an attribute table defined in one place. Provided API releases the user from adding attributes one by one as implemented in BLUEDROID. A demo of the other method to create the attribute table is presented in gatt_server_demo.
Please, check this tutorial for more information about this example.
Using ESP examples - BLE_GATT_DEMO, the well defined charateristics are used for:
- touch sensor to detect if the device is worn. If not for a while, it will indicate a warning signal (!)
- led command(HEX format): 00 for no light, 01 for pink, 02 for blue, 03 for ?
- Chat message receive
- Chat message send
- A development board with ESP32/ESP32-C3/ESP32-H2/ESP32-C2/ESP32-S3 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
- A USB cable for Power supply and programming
- P169H002 LCD (driver IC: ST7789V) with touch function (driver IC: CST816S)
See Development Boards for more information about it.
- SPI LCD 详解:https://docs.espressif.com/projects/esp-iot-solution/zh_CN/latest/display/lcd/spi_lcd.html
- IDF 编程指南:https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/index.html
- 参考示例 1:https://gitee.com/EspressifSystems/esp-idf/tree/master/examples/peripherals/lcd/spi_lcd_touch
- 参考示例 2:https://gitee.com/EspressifSystems/esp-iot-solution/tree/master/examples/display/lcd/qspi_with_ram
- SquareLine Studio 下载:https://squareline.io/downloads
- LVGL 文档:https://docs.lvgl.io/master/
- 【ESP32-S3 开发 SPI 屏【DIY 智能手表】】 https://www.bilibili.com/video/BV1Yc411y7bb/?share_source=copy_web&vd_source=c8d795024ceeeec2ec9795629c14939a
- 【lvgl SquareLine配合esp32的页面搭建以及动画,页面加载,回调使用】 https://www.bilibili.com/video/BV14i42197Jm/?share_source=copy_web&vd_source=c8d795024ceeeec2ec9795629c14939a
I (0) cpu_start: Starting scheduler on APP CPU.
I (512) BTDM_INIT: BT controller compile version [1342a48]
I (522) system_api: Base MAC address is not set
I (522) system_api: read default base MAC address from EFUSE
I (522) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (942) GATTS_TABLE_DEMO: create attribute table successfully, the number handle = 8
I (942) GATTS_TABLE_DEMO: SERVICE_START_EVT, status 0, service_handle 40
I (962) GATTS_TABLE_DEMO: advertising start successfully
My personal e-mail: lizepu2020@outlook.com
For any technical queries, please open an issue on GitHub. We will get back to you soon.