Reed Switch Module Project

The Reed Switch Module project demonstrates how to detect the presence of a magnetic field using a reed switch with an Arduino Mega. When a magnet is close to the reed switch, it closes the circuit, allowing the Arduino to detect the change in state.

Components Needed

Block Diagram

Circuit Setup

Connecting the Reed Switch Module to Arduino Mega:

Instructions

Code Upload:

Open the Arduino IDE and create a new sketch.

Copy and paste the provided Arduino code into the sketch.

Upload the code to the Arduino Mega.

Testing:

Open the Serial Monitor in the Arduino IDE (set to 9600 baud) to monitor the output.

Place a magnet near the reed switch to see the output change between "Magnet detected!" and "No magnet detected."

Applications

Notes