microsoft/iot-curriculum

Smart door using ESP-32

jimbobbennett opened this issue · 0 comments

This lab shows a prototype smart door setup using an ESP32 board.

An ESP32 and a stepper motor will simulate a door lock. The ESP32 can detect a magnet nearby, and this can simulate a detector for an open/closed door. The door status will feed to IoT Hub. The stepper motor will simulate a lock, and be controlled by IoT Hub to show how a smart lock can be cloud controlled.

The ESP32 will be coded in C++. There will be a Python app to show the data running in a Jupyter notebook

Hardware used

  • ESP32
  • Stepper motor
  • Breadboard
  • Magnet

Lab steps

  • Setting up ESP32 coding using PlatformIO
  • Setting up IoT Hub (links to existing Microsoft Docs)
  • Detecting a magnet and controlling a stepper motor
  • Connection to IoT Hub to send magnet detection data and respond to direct methods to lock the door
  • Visualizing door data and controlling the lock via a Jupyter notebook.

All labs should follow the lab contribution guidelines.