Electronic – arduino – Pushbutton Not Working with Arduino

arduinobreadboardwiring

I am trying to get a pushbutton working with the Arduino Button tutorial (and the example sketch). Unfortunately, I was not able to find a button like the one in the example and, instead, have a button with two pins from the bottom. (I don't know if this makes a difference – just trying to provide the information).

Below are pictures of my wiring of my breadboard and Arduino board. Am I doing something wrong here?

Full View
Close-Up Arduino
Close-Up Breadboard

Best Answer

[facepalm]

So, in case it wasn't obvious from the above question, I am new to the electronics side of the house. In fact, one reason I bought an Arduino breadboard, so I could learn about hardware and become more comfortable with it. (As a software developer, I tend to avoid hardware altogether other than understanding the basics of what is going on in my computer. With the level of abstraction in software these days, that is fairly easy to do.) While I was first going to just delete the question (mostly out of embarrassment), I figured I would share what I just learned so it may help others.

Basically, the reason the above wasn't working is explained in this tutorial by Lady Ada (image reposted below):

Breadboard Broken Down

In the image, you can see that there is a series of metal strips underneath the board. The long ones (called rails) connect the outside rows. Because of their length, they can connect 25 (or more) column holes at a time. By doing this, it makes it easy to provide power and ground to an entire column and to eventually feed off of for the board.

The shorter strips (called rows) connect strips of 5 holes. This is where I went wrong. I made the (wrong) mistake of thinking the rows were longer and ran all the way across the row. However, if you look at the image below, you can see that strips only run halfway across the board. Because of this, in the setup I had above, anything connected on the A-E side was not "talking to" anything on the F-J side. So, I moved everything over to one side, and it all works well.

I hope my newbie mistake helps someone else. Good luck!