I was wondering if it is possible to connect a Raspberry Pi to this switch, and if so what do I need to do so?
Option 1:If you can make reliable connections, the easiest way is to ger a RasPi power supply with an inline rocker or latching (push-on-push-off) switch like one of these.
If you open up the switch, the ground line goes straight through and the 5v line is switched like in this picture.
Connect the 5v in and out wires to the switch in your case using female Quick Disconnect (QD) connectors
or solder the wires to the tabs.
- Measure the width of the tabs on the switch. They are probably either 0.250" or 0.187"
- You'll probably want red ones for 22-18 gauge wire.
Make sure you have mechanically-solid, low-resistance (<2 Ohms) connections.
- If you aren't comfortable with making these power supply connections, go with Option 2.
Option 2:If you're not-so-good at making good connections, replace the rocker switch on the case with a momentary switch and wire it like this.
Either way, make sure you include some sort of mechanical strain relief so you dont stress/break the power wires/connections during routine handling/moving of the case.
Scott