| | |
| | | /* USER CODE END Header */ |
| | | /* Includes ------------------------------------------------------------------*/ |
| | | #include "main.h" |
| | | #include "usart.h" |
| | | #include "gpio.h" |
| | | |
| | | /* Private includes ----------------------------------------------------------*/ |
| | |
| | | |
| | | /* Initialize all configured peripherals */ |
| | | MX_GPIO_Init(); |
| | | MX_USART1_UART_Init(); |
| | | /* USER CODE BEGIN 2 */ |
| | | |
| | | printf("Welcome to ISKBoard!\r\n"); |
| | | { |
| | | float temp=30.0; |
| | | printf("Temperature: %.3f\r\n", temp); |
| | | } |
| | | |
| | | init_relay(); |
| | | init_led(); |
| | | |
| | |
| | | /* USER CODE BEGIN WHILE */ |
| | | while (1) |
| | | { |
| | | /* Blink Red Led */ |
| | | turn_led(Led_R, ON); |
| | | HAL_Delay(200); |
| | | turn_led(Led_R, OFF); |
| | | HAL_Delay(200); |
| | | |
| | | /* Blink Green Led */ |
| | | toggle_led(Led_G); |
| | | HAL_Delay(200); |
| | | toggle_led(Led_G); |
| | | HAL_Delay(200); |
| | | |
| | | /* Blink Blue Led */ |
| | | blink_led(Led_B, 200); |
| | | HAL_Delay(5000); |
| | | |
| | | /* USER CODE END WHILE */ |
| | | |