Read the statement by Michael Teeuw here.
Temperature regulated fan on RPI
-
I need some help (again).
I made a temperature regulated fan following these instructions:
https://www.npmjs.com/package/rpi-fan-controller
It works fine, but the fan starts at the default 45 degrees celsius.
I would like to change that to 55 or 60 degrees celcius.
I tried several things, but no succes.
Thanks foor any help.
Peter -
I think more information is needed. Did you run the script with
sudo rpifan -t 55orsudo rpifan --maxtemp 55? -
why not just using a python script?
found this one here:
#!/usr/bin/env python3 # coding: utf-8 import os import time import signal import sys import RPi.GPIO as GPIO pin = 36 # The pin ID, edit here to change it maxTMP = 50 # The maximum temperature in Celsius after which we trigger the fan GPIO.setmode (GPIO.BOARD) def setup(): GPIO.setmode(GPIO.BOARD) GPIO.setup(pin,GPIO.OUT) GPIO.setwarnings(False) return() def getCPUtemperature(): res = os.popen('vcgencmd measure_temp').readline() temp =(res.replace("temp=","").replace("'C\n","")) print("temp is {0}".format(temp)) #Uncomment here for testing return temp def fanON(): setPin(True) return() def fanOFF(): setPin(False) return() def getTEMP(): CPU_temp = float(getCPUtemperature()) if CPU_temp>maxTMP: fanON() else: fanOFF() return() def setPin(mode): # A little redundant function but useful if you want to add logging GPIO.output(pin, mode) return() try: setup() while True: getTEMP() time. sleep(8) # Read the temperature every 5 sec, increase or decrease this limit if you want except KeyboardInterrupt: # trap a CTRL+C keyboard interrupt GPIO.cleanup()
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login