Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BOARD)
- GPIO.setup(32, GPIO.OUT)
- base=GPIO.PWM(32,10) #this defines board pin 32, gpio pin 12, and makes the PWM 10 times per second, I think
- base.start(0)
- base.ChangeDutyCycle(0)
- ...
- if temp>40000:
- #set fan speed to 80%
- base.ChangeDutyCycle(80)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement