#define FAN_PWM_PIN 9 //9 or 10 for UNO
#define DEFAULT_DUTY_CYCLE 20
float dutyCycle = DEFAULT_DUTY_CYCLE;
void setup(){
Timer1.initialize(40); // 40 us = 25 kHz
}
void loop()
{
Timer1.pwm(FAN_PWM_PIN, (dutyCycle / 100) * 1023);
}
here is a picture of the PWM :
So far I have no idea why it is causing this issue. (not I can dela with that)