# Problem Create a program that does the following: Turn on one LED consecutively from LED[0] to LED[15] so that only one LED is on at a time and waits half a second between turning one LED off and turning the next on. This will look like a lit dot moving across the LEDs from right to left. Use a loop with an index variable to do this, don't hard code with multiple lines of code. # Process ... # Answer ```c int main(void) { /* Reset all peripherals. Initializes the Flash interface and the SysTick. */ HAL_Init(); /* Configure the system clock. */ SystemClock_Config(); /* Initialize all configured peripherals. */ MX_GPIO_Init(); MX_I2C1_Init(); MX_I2S3_Init(); MX_SPI1_Init(); MX_USB_HOST_Init(); MX_TIM7_Init(); /* Configure GPIOs. */ GPIOD->MODER = 0x55555555; GPIOC->MODER |= 0x0; /* Infinite loop. */ while (1) { /* Turn on the output LEDs one at a time. */ for (int i = 0; i <= 15; i += 1) { GPIOD->ODR = 0x0; GPIOD->ODR |= 1 << i; HAL_Delay(500); } MX_USB_HOST_Process(); } } ```