Example 4-2

Hi All,

I'm new to Arduino and to this forum. I apologize if this isn't the right place to post this – let me know and I'll make any necessary correction that I can.

My question has to do with Example 4-2 in Getting Started with Arduino, 3rd Ed. – turning on an LED while the button is pressed. When I release the button, the light either a) fades or b) stays on for a second, then turns off. But it's supposed to turn off immediately upon release, right? I've checked and rechecked the code and the wiring.

Thanks,

Nick

We don't all have copies of that book man...

Where's your code, and how's it wired?

Is this where you learn about pullup/pulldown resistors and their role in switches and buttons? Make sure you've got that right, if so... every newbie gets confused by pullup/pulldown resistors the first time they use a button.

Since we don't have the book, you will have to find a way to show us the book (photo), your code, and your wiring (good photo).

Hi,
Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Tom.... :slight_smile: