Mi Band Detector Using ESP32 BLE
by Bavensky in Circuits > Arduino
14931 Views, 17 Favorites, 0 Comments
Mi Band Detector Using ESP32 BLE
![1_C9c_3rxQ_Z_cBmFtQP6Osg.jpeg](/proxy/?url=https://content.instructables.com/FEY/YY72/JVFUSTUI/FEYYY72JVFUSTUI.jpg&filename=1_C9c_3rxQ_Z_cBmFtQP6Osg.jpeg)
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
![ble1.JPG](/proxy/?url=https://content.instructables.com/FIJ/245S/JVFUSTKV/FIJ245SJVFUSTKV.jpg&filename=ble1.JPG)
- Download and Install Library ESP32_BLE_Arduino
- Download the example code
Explore BLE-detector.ino
![ble2.JPG](/proxy/?url=https://content.instructables.com/FWR/JP84/JVFUSTLM/FWRJP84JVFUSTLM.jpg&filename=ble2.JPG)
Compile and Upload Code to Your Board
![ble3.JPG](/proxy/?url=https://content.instructables.com/F5J/XBXY/JVFUSTMV/F5JXBXYJVFUSTMV.jpg&filename=ble3.JPG)
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
![ble4.JPG](/proxy/?url=https://content.instructables.com/FEU/7BAZ/JVFUSTPH/FEU7BAZJVFUSTPH.jpg&filename=ble4.JPG)
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
![1_6wjFWaVmAIj62fGdybLJ9w.jpeg](/proxy/?url=https://content.instructables.com/FFO/KCIZ/JVFUSTRV/FFOKCIZJVFUSTRV.jpg&filename=1_6wjFWaVmAIj62fGdybLJ9w.jpeg)
- 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
Now You Can Make Another Cool Project and Happy Coding M(^-^)m
![ปลดล็อคประตูด้วย Mi band 3](/proxy/?url=https://content.instructables.com/FM7/5QKT/JVFUSTLL/FM75QKTJVFUSTLL.jpg&filename=ปลดล็อคประตูด้วย Mi band 3)