That way when the IDE decides that yuppers a float was declared but they want to put an integer in it so to save space I, the complier, is going to make the variable an int instead but I will not tell the programmer that I made the change.
You need to determine the PWM value that gives the MINIMUM fan speed, then the temperature range for MINIMUM and MAXIMUM speeds, then you can scale that to MINIMUM and MAXIMUM PWM values with the map function. The MINIMUM speed will probably be higher than you first think, you don't have to slow a fan down much before it feels like it's doing nothing.
Hello thank u for your help
The code enters in auto mode but does not remain in it. That's my problem.
The fan speed change one time when auto mode is activated but when the temperature changes, the speed does not change automatically. I have to press again # for the speed to change.