This is the first time I'm working on a physical kind of setup, and I'd like to make sure I have my research correct.
Goal:
- When I push a button, existing Raspberry Pi 2 B will execute a script to shut down my other PCs (ESXi hosts).
- At the same time, I'd like for there to be an LED to flash to show the script is in progress, until it is done.
- I'd like to do this without and soldering, and without the use of a breadboard.
Materials Needed?
1) Rugged Metal Pushbutton with Green LED Ring - 16mm Green Momentary - (ID: 560)
2) Arcade Button Quick-Connect Wire Pairs - 0.11" (10 pack) - (ID: 1152)
Proposed Wiring?
Code: Select all
LED Side | Raspberry Pi
|
+ (Anode) | GPIO Pin (ex: GPIO5)
- (Cathode) | GND
|
NO1 (Normally-Open) | GPIO PIN (ex: GPIO17)
C1 (Common) | GND
My questions:
- Am I correct to be using the 0.11" quick-connect wires for the switch?
- What about the 0.187" multi-colored quick-connect wires (ID: 3835) - would they fit?
- Can the JST connectors be plugged directly to the Raspberry Pi I/O pins or do I need to cut off the JST connector and crimp on 2 female dupont headers?
(Assuming I can find 2 appropriate ones that are:
Side by side such as GPIO5 on pin 29 and GND on pin 30, or
Vertically aligned such as GPIO17 on pin 11 and GND on pin 9) - Is my proposed wiring correct? No need to add my own resistor since the Button comes with one, right?
- I understand a GPIO pin supplies 3.3V. Is that enough for the LED? Just want to make sure since the description is a bit ambiguous. It says "Connect 3 to 6V to the LED to have it light up nicely" and the technical details says "Lamp rated voltage: 6V"