Mi Band Detector Using ESP32 BLE
by Bavensky in Circuits > Arduino
14488 Views, 17 Favorites, 0 Comments
Mi Band Detector Using ESP32 BLE
Hello Maker m(- -)m
I read this article form 陳亮 (moononournation github) about how to use esp32 ble for scan the device so i had to try this code on github Arduino_BLE_Scanner. now i want to use my Mi Band 3 to unlock the door when i come to my office, Let's see how it's work !!!
Things used in this project
- ESP32 TTGO T1
- Mi Band 2 or 3
- Computer with in Arduino IDE install already
Library & Service
Prepare Your Library
- Download and Install Library ESP32_BLE_Arduino
- Download the example code
Explore BLE-detector.ino
Compile and Upload Code to Your Board
When your upload this code to your board, you can see the program work on Serial monitor in baud rate 115200. Now you have to find the name of your mi band.
Edit Code for Detect Your Mi Band
On Arduino IDE, in line 65 - 82 is compare data form ble when the device name "Mi Band 3" that is your device. Next step you have to fine deviceAddress for make sure it's your Mi Band.
In line 74, You can change RSSI for adjust detection distant.
Look at the LED on Board When You Come Close the Device
- When ESP32 detect your Mi Band the LED onboard will turn ON
- When ESP32 can not detect your Mi Band the LED onboard will turn OFF