SHARE
TWEET

Untitled

a guest Jun 19th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GPIO.setup(20, GPIO.IN)
  2. GPIO.setup(21, GPIO.IN)
  3.  
  4. green_led_state = GPIO.input(20)
  5. red_led_state = GPIO.input(21)
  6. if green_led_state == True and red_led_state == False:
  7.     print('Green led active')
  8. if red_led_state == True and green_led_state == True:
  9.     print('Red led active')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top