Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------
- # RPi GPIO Fan Script
- # Desc: Currently runs the fan 24/7
- # Author: Swifty
- # Created: 8/23/16
- #-------------------------------------------------------------------------
- import RPi.GPIO as GPIO
- #Set up board and pins
- GPIO.setmode(GPIO.BCM)
- #What pin is the fan plugged into
- fan_pin = 15
- #GPIO setup for our fan
- GPIO.setup(fan_pin, GPIO.OUT)
- #Sets pin to high, turns our fan on
- GPIO.output(fan_pin, True)
- print "================================"
- print "fan.py has finished loading!"
- print "================================"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement