daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import RPi.GPIO as GPIO
  2. from time import sleep
  3.  
  4. Pins = [26, 18]
  5.  
  6.  
  7. class GPIOCTRL(object):
  8.  
  9.     def __init__(self):
  10.         GPIO.setwarnings(0)
  11.         GPIO.setmode(GPIO.BCM)
  12.         GPIO.setup(Pins[0], GPIO.IN)
  13.         GPIO.setup(Pins[1], GPIO.OUT)
  14.  
  15.     def set_led(value):
  16.         GPIO.output(Pins[0], value)
  17.  
  18.     def set_out_led(value):
  19.         GPIO.output(Pins[1], value)
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