Connection & interaction with a push button
Prerequisites : Installation of Raspbian and Installation of Python Schema : Here I chose the GPIO 17, but you can choose the one that suits you. Code : sudo nano tstBtn.py #button interaction : import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.IN) input = GPIO.input(17) prev_input = 0 Read More …