You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
527 B
35 lines
527 B
#pragma once
|
|
|
|
#include <wiringPi.h>
|
|
#include <softPwm.h>
|
|
|
|
using namespace std;
|
|
|
|
/**
|
|
* @brief PWM controlled fan without RPM detection
|
|
*/
|
|
class Fan{
|
|
/**
|
|
* @brief WiringPi GPIO number of pin which controls fan
|
|
*/
|
|
int GPIO_fan = 25;
|
|
|
|
public:
|
|
/**
|
|
* @brief Construct a new Fan object
|
|
* Create soft-PWM thread for fan control signal
|
|
*/
|
|
Fan();
|
|
|
|
/**
|
|
* @brief Enable cooling fan
|
|
*/
|
|
void On();
|
|
|
|
/**
|
|
* @brief Disable cooling fan
|
|
*/
|
|
void Off();
|
|
|
|
};
|