Components and supplies
Breadboard (generic)
Resistor 1k ohm
Jumper wires (generic)
Arduino UNO
LED (generic)
Apps and platforms
Arduino IDE
Project description
Code
LED ON when button is pressed
arduino
LED is set to ON when the button is pressed.
LED is OFF when button is pressed (Opposite effect)
arduino
LED is OFF when button is pressed (Opposite effect)
Downloadable files
Breadboard Diagram
Make connections as shown in the figure
Breadboard Diagram
Comments
Only logged in users can leave comments
brave-new-world
2 years ago
Thanks for putting this up. Just getting into Arduino and the hardest thing is not writing code, or following diagrams. Amazingly its finding simple things to do to help you learn. You have no idea how many simple projects are actually way too overly complicated i'e 'Starter project: Build Your Own Spaceship'.
Anonymous user
2 years ago
Thanks for putting this up. Just getting into Arduino and the hardest thing is not writing code, or following diagrams. Amazingly its finding simple things to do to help you learn. You have no idea how many simple projects are actually way too overly complicated i'e 'Starter project: Build Your Own Spaceship'.
Anonymous user
3 years ago
no work, do better. Parents must be disappointed.
Anonymous user
3 years ago
This is a total noob question. Why wouldn't the button be in the same circuit? I'm clearly thinking of a switch. Does the button function as a switch? Thanks Dan the noob
angelotulp
2 years ago
Thats also possible, then you can just use the code below and this circuit: https://www.tinkercad.com/things/1qgugA3vZ4O-led-with-pushbutton #define LED 3 void setup() { pinMode(LED, OUTPUT); } void loop() { digitalWrite(LED, HIGH); }
Anonymous user
3 years ago
Great incremental learning project from learning outputs with Blinky project to using a switch to learn input with a push button! Thanks!!
Anonymous user
3 years ago
Does this work with a 830 Tie-points Breadboard? Because when I set it up with it for some reason it wont work, and I don't have any other breadboard.
danger2011
4 years ago
ummm how do it put this it won't work
Anonymous user
6 years ago
No debounce?
superbruh2023
2 years ago
"Hippity Hoppity Your Code Is Now My Probity