STM32 Traffic Light Control
STM32 Traffic Light Control
Step 3 : Now Enter Commercial Part Number which is present on the Stm32
Board and Press Enter.
Step 4 : Give File name and Press Finish.
Step 11 : Now click on the Build (Hammer) Icon to debug the code
Step 12 : After debug Click on the Run Icon /Green Play button to run the project
.
Step 13 : A Configuration panel will pops up if not then go manually by pressing on
run configuration.
// Green
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET);
HAL_Delay(2000);
// Orange
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET);
HAL_Delay(1000);
}
Schematic