Advertisement
dadiw96

rasb

Apr 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. from socket import *
  2. import time
  3. import RPi.GPIO as GPIO ## Import GPIO Library
  4. import time ## Import 'time' library. Allows us to use 'sleep'
  5.  
  6. ## Ustalam zmienne ktore przechowuja numer portu gpio
  7.  
  8. gpio1 = 12
  9.  
  10.  
  11. ## ustawiam wszystkie porty gpio jako wyjscia
  12. GPIO.setmode(GPIO.BOARD) ## Bedziemy uzywac numeracji pinow
  13. GPIO.setup(gpio1, GPIO.OUT) ## GPIO 1
  14.  
  15.  
  16. ## usuwam wszystkie przypisania portow
  17. GPIO.cleanup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement