Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
1,768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. #-------------------------------------------------------------------------
  2. # RPi GPIO Fan Script
  3. # Desc: Currently runs the fan 24/7
  4. # Author: Swifty
  5. # Created: 8/23/16
  6. #-------------------------------------------------------------------------
  7.  
  8.  
  9. import RPi.GPIO as GPIO
  10.  
  11.  
  12. #Set up board and pins
  13. GPIO.setmode(GPIO.BCM)
  14.  
  15. #What pin is the fan plugged into
  16. fan_pin = 15
  17.  
  18. #GPIO setup for our fan
  19. GPIO.setup(fan_pin, GPIO.OUT)
  20.  
  21. #Sets pin to high, turns our fan on
  22. GPIO.output(fan_pin, True)
  23.  
  24.  
  25. print "================================"
  26. print "fan.py has finished loading!"
  27. print "================================"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement