This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with PWM and PID in temperature-controlled fan

I am doing a temperature-controlled fan, which means that the fan speed will depend on the temperature. I use PWM and PID in this code. My LCD have shown the temperature and humidity but the fan does not work. Can someone explain to this?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0