ESP32 Reed Switch Module Project
The ESP32 Reed Switch Module project demonstrates how to use a reed switch to detect the presence of a magnetic field with an ESP32 microcontroller. This project is useful for applications such as door/window sensors, magnetic proximity sensors, and various types of security systems.
Components Needed
- Power Supply
Block Diagram
Circuit Setup
Connecting the Reed Switch to ESP32:
Instructions
Setup:
Initialize serial communication for debugging purposes using
Configure the reed switch pin (
Configure the LED pin (
Operation:
- Use
- Print the state to the Serial Monitor using
- If the reed switch state is
- If the reed switch state is