Raspberry PI GPIO as Input in Python

We had mentioned using Raspberry PI GPIO as output in our previous post. Today we will talk about using Raspberry PI GPIO as input. We will try to read input from pushbuttons. We had connected pushbuttons as the Active Low state. Mean the pushbutton will remain in the Active High state unless we press any of button.

Once we press any push button that push-button will give Low input to the raspberry PI. We are going to demonstrate this simple program in python language. We will also use to combine our previous GPIO as an Output post. This will help you to grasp the concept more deeply and also will help you to practice more and more.

Here is a quick look at our circuit setup on the breadboard for this demo.

breadboard demo for rpi gpio input
Raspberry pi GPIO as Input

Here is the link to the source code for demo of this post

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.