I am creating a game board using a S3-WROOM. When a player places a piece on the board the ESP should detect it and begin sending it some PWM to drive a couple of LEDs. Is this a reasonable circuit or do I need the reed switch on a separate net? TIA
Screenshot From 2025-09-01 13-34-53.png
Should work, but A. keep in mind the max current through the reed switch you're using, and B. you may need a pulldown on the switched 5V as well as the LEDs might not pull the 5V line down by themselves. Also note that technically the ESP32 GPIOs aren't 5V compatible, although I doubt it'll pose an issue in your case; you could change R1 for a divider network that makes it into 3V3 if you're worried about that.