Breadboard with LED and button

Hi all,

I just bought an Arduino and I love it so far. I just set this up and it's not working. Cant' figure out why. What I am doing wrong?

Thanks a lot,

Peter

Start here

AWOL:
Start here

So better to post this in "General Electronics"?

Peterrtt:
So better to post this in "General Electronics"?

I don't know - do you think it is a "General Electronics" sort of question?

Replace the 10K resistor to GND on the switch with a jumper to GND.

Change your switch input mode to "INPUT_PULLUP".

Try again :slight_smile:

Peterrtt:
So better to post this in "General Electronics"?

The instructions tell you how to post questions.

Where to post them is the very least of your problems!

Here is your image:
Screenshot 2019-02-16 at 15.29.55.png
There might be some benefit to having a 1k resistor in series with the pushbutton in case you were to set that pin to be an OUTPUT in the code and have the button short it out. The correct way to wire it is in any case, as you have with the button to ground and use INPUT_PULLUP to pull the pin up while the button is not pressed.

Your diagram is unclear, but appears to show the LEDs both wired backwards. LEDs in parallel may not illuminate equally and certainly will not if they are different colours.

You need to include your code in the posting itself using "code" tags as per the instructions. As it is, the LEDs - when wired correctly - will be lit when the button is not pressed.