• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
kalitut

kalitut

KaliTut Where you learn about Kali Linux tips and Linux system

  • Home
  • Raspberry Pi
  • WRITE FOR US
  • Privacy Policy
  • About us

Raspberry Pi GPIO input wired with button/switch

November 26, 2017 by Kalitut Leave a Comment

Raspberry Pi GPIO input wired with button

Raspberry Pi GPIO input

Basically, you can operate a GPIO pin either as an input or as an output. As an input, it can assume the states “High” and “Low”. For example, from a switch or button. 
In general, Raspberry Pi’s GPIOs are wired with resistors to set inputs to a defined level (+ VCC or GND) or to limit the current.

  • Basics: Connect Raspberry Pi GPIO

GPIO input with push-button / switch and pull-up resistor

Raspberry Pi pull up resistor

The pullup principle pulls the GPIO input to the + VCC level with a pull-up resistor. The ground state of the input would then be “high” or “logical 1”. With a switch or pushbutton, the GPIO input is pulled or switched to ground (GND). That is, in the switched state, the input would have the state “Low” or “logical 0”.

GPIO input with push-button / switch and pull-down resistor

Raspberry Pi pull down resistor

The pull-down principle pulls the GPIO input with a pulldown resistor to ground (GND). The ground state of the input would then be “low” or “logical 0”. With a switch or pushbutton, the GPIO input was pulled to the level of + VCC. This means that in the switched state, the input would have the status “High” or “Logic 1”.

GPIO input with button / switch and cross resistance

Raspberry Pi cross resistance

Basically, the current in the switched state (push button / switch actuated) is limited only by the resistance of the internal components. In order to limit the current in the external wiring, an additional shunt resistor is often switched in front of the GPIO input.

Pull-up or pull-down resistor?
It is recommended to connect GPIO inputs with a pull-up or pull-down resistor. The question is, why is such a resistance necessary? And which principle should be used? So pullup or pulldown? And what size should these resistors have?

  • GPIO with pull up or pull down resistor?

Filed Under: Raspberry Pi Tagged With: Raspberry Pi GPIO

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow us

  • Facebook
  • Twitter
  • YouTube

Write for us

  • WRITE FOR US

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • Best hacking gadgets for security researchers
  • ntds-analyzer hashes analyzer
  • Scilla – Information Gathering tool
  • how to install google chrome in Kali Linux
  • Introduction to Security Penetration using Linux
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2021