Raspberry Pi - GPIO Basics with Python
What will be the output of this code snippet if the button connected to pin 22 is pressed (assuming pressed means HIGH)?
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(22, GPIO.IN) state = GPIO.input(22) print(state)
