Declares the FanController class for managing PWM-based fan speed control.
uint8_t GetPWM()
Retrieves the current PWM value.
void SetSpeed(float ratio)
Sets the fan speed as a ratio of its maximum speed.
void Initialize()
Initializes the fan controller by setting up the pin for PWM output.
FanController(uint8_t pin)
Constructs a FanController with the specified pin.
uint8_t pwm
The current PWM value (0-255).
uint8_t pin
The pin number connected to the fan's PWM input.
void SetPWM(uint8_t pwm)
Sets the PWM value to control the fan speed.
static T Map(T value, T inLow, T inMax, T outMin, T outMax)
Maps a value from one range to another.