ISKBoard example project
guowenxue
5 days ago 49447b2738a874071a2a4bb61b3e0c2af6be989f
Core/Src/main.c
@@ -18,11 +18,15 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "adc.h"
#include "tim.h"
#include "usart.h"
#include "gpio.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "miscdev.h"
#include "ws2812b.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -86,20 +90,23 @@
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_USART1_UART_Init();
  MX_ADC1_Init();
  MX_TIM6_Init();
  MX_TIM1_Init();
  /* USER CODE BEGIN 2 */
  init_relay();
  init_led();
  /* Turn on relay after 1 second */
  HAL_Delay(1000);
  turn_relay(Relay1, ON);
  ws2812b_init();
  beep_start(2, 300);
  /* USER CODE END 2 */
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
     HAL_Delay(5000);
     /* Blink WS2812B strip lights */
     ws2812b_blink();
    /* USER CODE END WHILE */