© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
DevHeads IoT Integration ServerDIIS
DevHeads IoT Integration Server•14mo ago•
1 reply
Afuevu

How to fix fan toggling issue in temperature control system?

So guys there's a piece of code, that involves temperature measurement. If the temperature is more than a certain value, a fan comes on, else it goes off. The sensor used is an NTC sensor, hooked up to a heat sink. This is the line of code:
if (temperature > 30)
{
FANON;
}
else
{
FANOFF;
}
the bug I have observed is that once the temperature gets to 30 degree the fan comes on, after some few seconds, the Temperature drops, the fan goes off, few seconds again the fan comes on just like that, which is not good for the system, I love to know how we would address the issue, in a simple way @here
DevHeads IoT Integration Server banner
DevHeads IoT Integration ServerJoin
The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.
2,984Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to Optimize Control Pins for Basic Movement Functions in a Robot Using L298N Dual H-Bridge?
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
2y ago
Virtualization in Embedded Systems
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
3y ago
Selection of Temperature Sensor for Universal Joint Cross [Monitoring]
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
3y ago
How to fix SG90 servo motor jitter on BeagleBone Black with PWM?
DevHeads IoT Integration ServerDIISDevHeads IoT Integration Server / 🟩-pcb-and-analog
2y ago