Introduction: THREE LED PATTERN USING BREADBOARD

In this project, we're using a breadboard and an STM (System Target Management) setup to create a cool light pattern with three LEDs. It's like making a mini light show! By arranging and controlling the LEDs, we can make them blink or glow in different patterns. It's a fun way to learn about electronics and coding while making something eye-catching. So let's dive in and see what kind of cool patterns we can create.

Supplies

  1. STM32F401CE
  2. LED 3V
  3. Jumper wires M-F
  4. C-type Cable
  5. Breadboard

Step 1: Create New File in STM32cubeIDE

Open STM32cubeIDE>>file>>New>>STM32project.

Step 2: Configure Your STMcubeIDE

Select your stm board, after selecting rename it.

Step 3: PIN Mode Selection & Pinout Configuration

set the pin c13,14,15 for GPIO_output.

For Pinout configuration follow below steps.

System core>>RCC>>High speed clock(HSE)>>Crystal/ceramic Resonator.

Step 4: Clock Configuration

For Clock Configuration fill the Columns shown in picture.

Step 5: Open New Code File

Now press ctrl+s to open codding file, After this the new code file will open.

Step 6: Add the Code

HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,0);

   HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,0);

   HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,0);

   HAL_Delay(400);

   HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,0);

     HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,0);

     HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,1);

     HAL_Delay(400);

     HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,0);

      HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,1);

      HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,0);

      HAL_Delay(400);

      HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,0);

        HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,1);

        HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,1);

        HAL_Delay(400);

        HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,1);

         HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,0);

         HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,0);

         HAL_Delay(400);

         HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,1);

           HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,0);

           HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,1);

           HAL_Delay(400);

           HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,1);

            HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,1);

            HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,0);

            HAL_Delay(400);

            HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,1);

              HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,1);

              HAL_GPIO_WritePin(GPIOC,GPIO_PIN_15,1);

              HAL_Delay(400);

Write this given code in While Loop.

Step 7: Build Binary File

Click on debug (On top left corner) to build a new binary file.

Step 8: Open STMCubeProgrammer and Connect With STM Board Via USB

Change ST-Link to USB and click on 'Connect'.

Step 9: Go to Download Options

Step 10: Modify Download Options and Click on "Start Automatic Mode

Step 11: Final Step