FanController
FanController copied to clipboard
AVR only - add optional pwmMode constructor variable, add methods to set and get PWM frequency when using timer based PWM generation
All credit goes to Sam Knight for his FastPWM library - PWM.h https://code.google.com/archive/p/arduino-pwm-frequency-library/downloads https://forum.arduino.cc/t/pwm-frequency-library/114988 https://github.com/RCS101/PWM
Changes summary:
- All changes are for AVR platform only.
- Added pwmMode constructor variable, 0 - Arduino native PWM, 1 - Timer based Fast PWM with option to change frequency.
- Added get / set methods for frequency, units are Hz.
bool FanController::setPwmFrequency(int32_t freq)
int32_t FanController::getPwmFrequency()
- Added example arduino sketch.