mirror of
https://github.com/debnarpavol/spajanie_snimkov_uprava_jasu.git
synced 2025-07-04 03:57:21 +02:00
35 lines
527 B
C++
35 lines
527 B
C++
#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();
|
|
|
|
};
|