I'm trying to check whether a series of valves (described here Can I measure if current is on or off in cable with 24v DC (in a cheap way)) are open or not.
Updated question to be more specific after getting some answers:
If I mount a micro switch, like the one in the image below, on the valve so that the "normally open" pin on the switch is closed when the valve is opened, how would I wire it to a gpio on a Raspberry so I can check if it closed or not, e.g. every 10 minutes?
I might use the gpio utility to check the pin. Would I then wire the "common" to a 3.3v on the Raspberry and the "normally open" to a gpio and then set the pin's mode to pulldown with
gpio mode <pin> down? And the read the pin with
gpio read <pin>?
Question 2: Can I wire multiple switches to the same voltage pin on the Rapsberry?
Question 3: Can I freely select to use either 3.3v and 5v?