[raspberry-vi] Next step using breakout board: detecting a button

  • From: Alex Hall <mehgcap@xxxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Sun, 28 Jan 2018 19:20:21 -0500

Hi all,
First, Tom, disregard my question about the connector and cable. They fit 
eventually. One suggestion for your layout guide: say which side of the board, 
identified by grooves or protrusions, is which power. As I understand it, the 
side with the protrusions is the 3.3V side?
I now have the board, connector, cable, and Pi all wired up as I understand the 
layout to be. Hopefully, I have it right. I also have a button, which has four 
wires on it. My question is about as basic as it gets: how do I get the Pi to 
detect this button? Not the code--code I can deal with--but the board. What do 
the four leads do? How do I get from a lead to the GPIO pins on the connector? 
Here's my guess, and people can tell me how horribly wrong I am.

The button has four connectors, two on each side. One pair is for ground, one 
for power. I assume each pair has one ground and one power, with each set of 
ground/power wires across from each other. That is, if the button's wires were 
named the same as the Pi's pins, 1 and 2 would be power, while 3 and 4 would be 
ground.

If I want the ground on pins 1 and 3, and the power on 2 and 4, I place the 
button anywhere on the board, straddling the central line where there are no 
holes. I then take four male-to-male wires, and connect the rows of holes. A 
wire goes from pin 1 to the corresponding row, where the wire of the button is, 
and so on, connecting each pin to the row of the button's wire.

Is this at all correct? The tutorials I've found online so far have image 
instructions, or use LEDs in the circuit. I don't have anyone handy who can 
identify the resistors for me, so I don't want to do anything that needs a 
resistor just yet. I figure I can't go wrong with a button, though, so long as 
I feed power from the 3.3V side. Oh, that leads to one other question: to 
connect power, I run male-to-male wires from any pin on the power column I want 
(column A in my case) to the power pin, then do the same for B to the ground 
pin. Right?

This is starting to make sense in my head, but I want to make sure I'm 
picturing all of it correctly before I get too far, try something, and fry $35 
of hardware. Thanks in advance for the clarifications and corrections I know 
I'll need.

--
Alex Hall





=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: