This project demonstrates how to use the ESP32-C3-DevKitM-1 microcontroller to register and control a Sesame5 smart lock. Utilizing the ESP-IDF development framework and BLE technology, this example automatically searches for, connects to, and registers nearby Sesame5 devices. When the ESP32-C3-DevKitM-1 detects that the Sesame5 is in the unlock position, it issues a command to automatically lock it.
You will need to install ESP-IDF, which can be done using the install.sh
script from the ESP-IDF to install necessary toolchains and dependencies.
- Ensure that you have installed the toolchain through ESP-IDF's
install.sh
. - Open a terminal, navigate to the ESP-IDF path, and run
export.sh
to add it to your environment variables. - Connect your ESP32-C3-DevKitM-1 to your computer via USB.
- Return to the project folder and run
idf.py flash
to compile and flash.
After flashing and rebooting the ESP32-C3-DevKitM-1, it will automatically search for unregistered Sesame devices nearby. Once connected and registered, the ESP32-C3-DevKitM-1 will monitor the status of the Sesame5 and issue a lock command at the appropriate time.
- Automatic Device Discovery: Automatically searches for and connects to nearby Sesame5 smart locks.
- Automatic Locking: Issues a lock command when the Sesame5 reaches the preset unlock position.
This example is modified from the nimble BLE Central Example within ESP-IDF.
- Visit the CANDY HOUSE Official Website for more information about the Sesame5 smart lock.
This project is licensed under the MIT License. See the LICENSE
file for details.
Thank you for your interest in this project and the support of open resources by CANDY HOUSE.