This is basic demo of using Arduino for reading inputs. Explains Pull up and Pull down concept. Two push to on switches are interfaced and used to control 2 LEDs.
EXPANDED TECHNICAL DETAILS
Fundamental Floating-Point Logic
This technical tutorial explores the critical electrical concepts required to reliably read physical buttons and switches with a microcontroller.
- Internal Pull-Up Management: Explains how to use the Arduino's built-in 20kΩ-50kΩ resistors using the
INPUT_PULLUPmode. This ensures that the digital pin remains at a solid logicHIGH(3.3V/5V) when the button is not pressed, preventing erratic "Floating" states caused by electrical noise. - Pull-Down Circuit Analysis: Demonstrates the use of a physical 10kΩ external resistor to tie the pin to ground (Logic
LOW). The firmware then looks for aHIGHsignal during a button press, ideal for learning standard electrical pull-down configurations.
Practical Application
- Software Debounce Pulse: Includes a code snippet that ignores signals shorter than 50ms, ensuring that a single mechanical button press results in exactly one clean digital event.