Array of Switches on One Pin

Hi Everyone!

I just want to double check my understanding on something. I understand that you can have multiple switches on a single pin and have resistors between each to determine which switch is activated. For a project I'm working on I have an array of reed switches and I don't particularly care which was activated. Most of the time nothing should be happening and I just want to get sort of a binary output if any are triggered.

If that is the case can they all just share one pullup resistor between the array and the microcontroller? And then all be on the same pin?

Thanks!

Yes, use the internal pullup on the input pin. Wire the switches, in series, from the input to ground. While all switches are closed the input will read LOW. If any one switch is opened the input will go HIGH.

If they are normally open, wire them in parallel, then any one closing will conduct.
If normally closed, wire in series.