A proper way to use a button and an LED - General Electronics - Arduino Forum
4.9 (370) · € 21.50 · In Magazzino
![A proper way to use a button and an LED - General Electronics - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/4/6/a/46a7d1124d5ba185c3b12eb00544ce53a0313b61.png)
Could somebody please explain the reason the following circuit works "fine" (LED is on if the button is pressed) only if the Pin 12 is in the OUTPUT-mode? I need to be able to digitalRead() the button state (pressed/not pressed) and the LED should be on every time the button is pressed without using two pins (one input and one output). What is the proper way to achieve that?
![Push Button LED - The Arduino Starter Kit - Arduino Forum](https://europe1.discourse-cdn.com/arduino/optimized/3X/6/e/6e642e378704399f9e9e7fae411842b9c7d011bb_2_690x267.png)
Push Button LED - The Arduino Starter Kit - Arduino Forum
![4 pin led push button - LEDs and Multiplexing - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/a/c/c/accd04ade497b0c23846230f5218e720150698e0.jpeg)
4 pin led push button - LEDs and Multiplexing - Arduino Forum
![LED and Switch with Arduino Uno](https://binaryupdates.com/wp-content/uploads/Connection-LED-with-Arduino-Uno.jpg)
LED and Switch with Arduino Uno
![How to control a lead that needs to go to GND - General Electronics - Arduino Forum](https://europe1.discourse-cdn.com/arduino/optimized/4X/8/6/5/865205657c44ffbb47b3e33d2c1c5c4e35a1d89c_2_653x500.jpeg)
How to control a lead that needs to go to GND - General Electronics - Arduino Forum
![Solved This exercise will require the use of LEDs, a](https://media.cheggcdn.com/media/da2/da2890b1-4b38-4cca-a019-6848cd699bc3/phpqPEy3V.png)
Solved This exercise will require the use of LEDs, a
![How Can I Detect Button Pressing? - Project Guidance - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/f/2/2/f22058f8503ce208248cac36dcbee5826297c34c.png)
How Can I Detect Button Pressing? - Project Guidance - Arduino Forum
![Push button input flickering from EM interference? - General Electronics - Arduino Forum](https://europe1.discourse-cdn.com/arduino/optimized/3X/5/0/50f1081bdb492142baa8bf63d57f7f9c5d9c513c_2_1024x804.png)
Push button input flickering from EM interference? - General Electronics - Arduino Forum
![Solved] Led in series with push button? - General Electronics - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/1/8/d/18d8d2e4d173bafd79f5d464bc44b6ce0e16784d.png)
Solved] Led in series with push button? - General Electronics - Arduino Forum
![Wiring assistance required for 4 pin LED button - Project Guidance - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/e/3/3/e338ac9ea498c00d8991c8eb792a22e283320451.jpeg)
Wiring assistance required for 4 pin LED button - Project Guidance - Arduino Forum
![Blink an LED With Digital Output : 6 Steps - Instructables](https://content.instructables.com/FUH/FT3Q/JD2FBOB8/FUHFT3QJD2FBOB8.gif?auto=webp&fit=bounds&frame=1)
Blink an LED With Digital Output : 6 Steps - Instructables
![Error in my LED output - Project Guidance - Arduino Forum](https://europe1.discourse-cdn.com/arduino/optimized/4X/0/0/7/0071b5d09fabda6efbddc95870ddc1e468407abf_2_666x500.jpeg)
Error in my LED output - Project Guidance - Arduino Forum
![Button not working - General Electronics - Arduino Forum](https://europe1.discourse-cdn.com/arduino/original/4X/0/8/4/084d1e063b7ea1531b1e9aa77c63cc0a28387ff7.jpeg)
Button not working - General Electronics - Arduino Forum