THREE LED PATTERN USING BREADBOARD
by Arshdeep singh in Circuits > Electronics
52 Views, 0 Favorites, 0 Comments
THREE LED PATTERN USING BREADBOARD
![Screenshot 2024-04-10 174557.png](/proxy/?url=https://content.instructables.com/FR4/A075/LUSE6Y1O/FR4A075LUSE6Y1O.png&filename=Screenshot 2024-04-10 174557.png)
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
![Screenshot 2024-04-09 181002.png](/proxy/?url=https://content.instructables.com/FU3/IU9I/LUSE6Y4T/FU3IU9ILUSE6Y4T.png&filename=Screenshot 2024-04-09 181002.png)
![Screenshot 2024-04-09 180824.png](/proxy/?url=https://content.instructables.com/FKQ/1LIJ/LUSE6Y50/FKQ1LIJLUSE6Y50.png&filename=Screenshot 2024-04-09 180824.png)
![Screenshot 2024-04-09 180854.png](/proxy/?url=https://content.instructables.com/F1P/IUPK/LUSE6Y51/F1PIUPKLUSE6Y51.png&filename=Screenshot 2024-04-09 180854.png)
![Screenshot 2024-04-10 175348.png](/proxy/?url=https://content.instructables.com/F7E/HJHT/LUSE6Y5G/F7EHJHTLUSE6Y5G.png&filename=Screenshot 2024-04-10 175348.png)
![Screenshot 2024-04-09 181133.png](/proxy/?url=https://content.instructables.com/FU8/QJAG/LUSE6Y5P/FU8QJAGLUSE6Y5P.png&filename=Screenshot 2024-04-09 181133.png)
- STM32F401CE
- LED 3V
- Jumper wires M-F
- C-type Cable
- Breadboard
Create New File in STM32cubeIDE
![Screenshot 2024-03-12 150750.png](/proxy/?url=https://content.instructables.com/FPV/HLAS/LUSE6Y7W/FPVHLASLUSE6Y7W.png&filename=Screenshot 2024-03-12 150750.png)
Open STM32cubeIDE>>file>>New>>STM32project.
Configure Your STMcubeIDE
![Screenshot 2024-03-12 151107.png](/proxy/?url=https://content.instructables.com/FW2/C0XK/LUSE6Y9T/FW2C0XKLUSE6Y9T.png&filename=Screenshot 2024-03-12 151107.png)
Select your stm board, after selecting rename it.
PIN Mode Selection & Pinout Configuration
![Screenshot 2024-04-10 180442.png](/proxy/?url=https://content.instructables.com/FTE/WPAJ/LUSE6YDP/FTEWPAJLUSE6YDP.png&filename=Screenshot 2024-04-10 180442.png)
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.
Clock Configuration
![Screenshot 2024-04-10 180519.png](/proxy/?url=https://content.instructables.com/F28/15HG/LUSE6YOK/F2815HGLUSE6YOK.png&filename=Screenshot 2024-04-10 180519.png)
For Clock Configuration fill the Columns shown in picture.
Open New Code File
![Screenshot 2024-04-09 184535.png](/proxy/?url=https://content.instructables.com/FRA/M3JW/LUSE6YZ5/FRAM3JWLUSE6YZ5.png&filename=Screenshot 2024-04-09 184535.png)
Now press ctrl+s to open codding file, After this the new code file will open.
Add the Code
![Screenshot 2024-04-10 181844.png](/proxy/?url=https://content.instructables.com/F73/R8CS/LUSE6Z2J/F73R8CSLUSE6Z2J.png&filename=Screenshot 2024-04-10 181844.png)
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.
Build Binary File
![Screenshot 2024-03-12 160000.png](/proxy/?url=https://content.instructables.com/F4V/UBOA/LUSE6ZBI/F4VUBOALUSE6ZBI.png&filename=Screenshot 2024-03-12 160000.png)
Click on debug (On top left corner) to build a new binary file.
Open STMCubeProgrammer and Connect With STM Board Via USB
![Screenshot 2024-04-09 185612.png](/proxy/?url=https://content.instructables.com/FCN/OQ71/LUSE6ZGL/FCNOQ71LUSE6ZGL.png&filename=Screenshot 2024-04-09 185612.png)
Change ST-Link to USB and click on 'Connect'.
Go to Download Options
![Screenshot 2024-03-12 160543.png](/proxy/?url=https://content.instructables.com/F7N/41SL/LUSE6ZJE/F7N41SLLUSE6ZJE.png&filename=Screenshot 2024-03-12 160543.png)
Modify Download Options and Click on "Start Automatic Mode
![Screenshot 2024-04-09 190221.png](/proxy/?url=https://content.instructables.com/F9O/TA9V/LUSE6ZLM/F9OTA9VLUSE6ZLM.png&filename=Screenshot 2024-04-09 190221.png)
Final Step
![Screenshot 2024-04-10 182705.png](/proxy/?url=https://content.instructables.com/FO5/0CFP/LUSE6ZO5/FO50CFPLUSE6ZO5.png&filename=Screenshot 2024-04-10 182705.png)