Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BOARD) # Means use physical pin numbers
- GPIO.setup(11,GPIO.IN,pull_up_down=GPIO.PUD_UP) # set to input with pull-up resistor
- while True:
- if (GPIO.input(11) == 0):
- print("Button Pressed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement