Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. GPIO.setmode(GPIO.BOARD)
  3. GPIO.setup(32, GPIO.OUT)
  4. base=GPIO.PWM(32,10) #this defines board pin 32, gpio pin 12, and makes the PWM 10 times per second, I think
  5. base.start(0)
  6. base.ChangeDutyCycle(0)
  7.  
  8. ...
  9.  
  10. if temp>40000:
  11. #set fan speed to 80%
  12. base.ChangeDutyCycle(80)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement