Use a reed switch as a magnet-operated contact, adding a pull-up, debounce, and suitable mechanical placement.
Read the YL-99 impact-switch module with a defined pull-up and verify its polarity and board pinout before wiring.
Read the KY-031 as a mechanical impact switch and debounce its short, bouncing pulses in software.
Measure low-pulse occupancy from a DSM501A to follow dust trends, without presenting the result as a regulatory PM2.5 measurement.