Mi Band Detector Using ESP32 BLE

Introduction: 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

  1. ESP32 TTGO T1
  2. Mi Band 2 or 3
  3. Computer with in Arduino IDE install already

Library & Service

  1. ESP32_BLE_Arduino

Step 1: Prepare Your Library

  1. Download and Install Library ESP32_BLE_Arduino
  2. Download the example code

Step 2: Explore BLE-detector.ino

Step 3: 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.

Step 4: 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.

Step 5: 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

Step 6: Now You Can Make Another Cool Project and Happy Coding M(^-^)m

Be the First to Share

    Recommendations

    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge

    Discussions