กลับไปหน้ารวมไฟล์
reading-inputs-with-pull-up-pull-down-91dbd1-en.md

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_PULLUP mode. This ensures that the digital pin remains at a solid logic HIGH (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 a HIGH signal 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.

ข้อมูล Frontmatter ดั้งเดิม

title: "Reading Inputs with Pull Up & Pull Down"
description: "Shows how to read switches and sensor connected to Arduino."
author: "curieelectronics"
category: ""
tags:
  - "environmental sensing"
  - "lights"
  - "embedded"
  - "data collection"
views: 15862
likes: 0
price: 699
difficulty: "Intermediate"
components:
  - "1x Arduino UNO"
  - "2x Tactile Switch, Top Actuated"
  - "2x Resistor 4.75k ohm"
  - "1x Breadboard (generic)"
  - "2x 5 mm LED: Red"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "b22a26b17e9dc0bb8e549d98f7ffe95afdb0f8409b9d2f9f7dc5377950ca2589"
encryptedPayload: "U2FsdGVkX1+Esd1Ce9AvtKOm3FxbpKF4DpBbxcrLv9fVomUFQb94lRgCa4FC4zU3Jsd4W3i0yob2p4iBOqI3JdwPni2rNpDfohuKgv/gFI0="
seoDescription: "Learn how to read digital Inputs from switches and sensor on Arduino using Pull Up and Pull Down resistors."
videoLinks:
  - "https://www.youtube.com/embed/6CTcBmAhNSY"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/reading-inputs-with-pull-up-pull-down-91dbd1_cover.jpg"
lang: "en"