-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No more noisy fans! #4
base: master
Are you sure you want to change the base?
Conversation
Changed the controller to dynamically update the speeds based the temperature
fancontrol.py
Outdated
|
||
time.sleep(SLEEP_INTERVAL) | ||
time.sleep(SLEEP_INTERVAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see here I didn't leave a line at the end of the code and its raised an error. What is the reason for needing a new line at the end of the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a standard for most programming languages. It helps ensure proper parsing on all platforms. Here's one explanation: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ive just uploaded a new version with the corrections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did add the blank line at the end of the file I'm not sure why it isn't showing.
Is this configurable, and off by default? As some fans won't work well with this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot, but it would be good to know if this will work for all fans. I saw a comment suggesting it wouldn't. If that's the case, we should add this as a feature, but leave it disabled by default.
Thanks for contributing btw, and good work. Sorry for the delay!
fancontrol.py
Outdated
SLEEP_INTERVAL = 5 # (seconds) How often we check the core temperature. | ||
GPIO_PIN = 17 # Which GPIO pin you're using to control the fan. | ||
SLEEP_INTERVAL = 3 # (seconds) How often we check the core temperature. | ||
GPIO_PIN = 18 # Which GPIO pin you're using to control the fan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the pin need to change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it does as not all GPIO pins are PWM enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RPI manual will tell you which of the pins are PWM enabled. They aren't all but there are a few
Good point- I'm not sure if any fans would be affected I followed your tutorial and it worked okay. I'll go back and add the option though! |
There are some fans that need a "kick" to start using 0.5 values on PWM. I think a good approach would be to set the output to |
Hey, I finally set up a new pi and needed to use this again- I left an option to choose between using threshold and variable speeds. |
Hey, anything I need to add or fix to get this approved? |
The program now ramps up the speed of your fan as and when it needs!
This drastically reduces the noise as the fan seldom ramps up past 60%.
The OUTPUTS and TEMPS variables are meant to be tweaked according to your wants and needs.
Its my first time contributing to anybody else's code so all criticism is welcome :)