I'm a newbie to raspberry pi build a small circuit using a switch and capturing the input of the switch if I press it.
After the circuit been designed I dont't its working as expected. Is there a way to validate and see if my circuit is correct or wrong?
Here is my code:-
import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(12,GPIO.IN) while True: input_value = GPIO.input(12) if input_value == True: print("the button has been pressed") while input_value == False: input_value = GPIO.input(12)