Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import RPi.GPIO as GPIO
  2.  
  3. GPIO.setup(1, GPIO.IN)
  4.  
  5. if GPIO.input(1):
  6.     print('Nivel de entrada HIGH')
  7. else:
  8.     print('Nivel de entrada LOW')