https://github.com/beckversync/stm32-traffic-light-control-system
Welcome to the STM32 Traffic Light Control System Project! π οΈ In this project, weβre building a fully-featured traffic light simulation for a crossroad, complete with customizable timing and interactive controls! Letβs get started! π‘
https://github.com/beckversync/stm32-traffic-light-control-system
Last synced: 4 months ago
JSON representation
Welcome to the STM32 Traffic Light Control System Project! π οΈ In this project, weβre building a fully-featured traffic light simulation for a crossroad, complete with customizable timing and interactive controls! Letβs get started! π‘
- Host: GitHub
- URL: https://github.com/beckversync/stm32-traffic-light-control-system
- Owner: Beckversync
- Created: 2024-10-29T06:03:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T12:09:23.000Z (about 1 year ago)
- Last Synced: 2025-03-23T08:22:01.002Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 2.96 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π¦ STM32 Traffic Light Control System π
Welcome to the **STM32 Traffic Light Control System Project**! π οΈ In this project, weβre building a fully-featured traffic light simulation for a crossroad, complete with customizable timing and interactive controls! Letβs get started! π‘
## π Specifications
- **π‘ LEDs:** 12 total β 4 Red π΄, 4 Amber π , 4 Green π’
- **π₯οΈ 7-Segment Displays:** 4 total β 2 per road for time display β³
- **ποΈ Buttons:**
- Mode Selection π
- Time Adjustment β±οΈ
- Value Confirmation β
- **π Modes:**
1. **Normal Mode:** Traffic lights operate automatically π
2. **Modify Red LED Time:** Adjust red light duration π΄
3. **Modify Amber LED Time:** Adjust amber light duration π
4. **Modify Green LED Time:** Adjust green light duration π’
---
## π Exercises Breakdown
### π§ Exercise 1: Sketch an FSM
**π― Objective:** Design a **Finite State Machine (FSM)** to map out system behavior.
### π§ Exercise 2: Proteus Schematic
**π― Objective:** Draw the full **Proteus schematic** for the traffic light system.
### π οΈ Exercise 3: Create STM32 Project
**π― Objective:**
- Set up an STM32 project in **CubeIDE**.
- Map pins according to the **Proteus schematic**.
- Configure a **10ms timer interrupt** β±οΈ.
### βοΈ Exercise 4: Modify Timer Parameters
**π― Objective:** Fine-tune the timer to allow flexible **interrupt duration (1ms - 100ms)** without affecting overall system behavior.
### π Exercise 5: Button Debouncing
**π― Objective:**
- Add **input reading** and **output display** modules.
- Implement **button debouncing**.
- Ensure **mode increases** on the first button press.
### π₯οΈ Exercise 6: Displaying Modes
**π― Objective:**
- Show the current **mode on 7-segment displays**.
- Control **LED blinking behavior** based on the selected mode.
### π΄ Exercise 7: Modify Red LED Duration
**π― Objective:**
- Use the second button to **increase red LED time**.
- Use the third button to **confirm the red LED duration**.
### π Exercise 8: Modify Amber LED Duration
**π― Objective:**
- Use the second button to **increase amber LED time**.
- Use the third button to **confirm the amber LED duration**.
### π’ Exercise 9: Modify Green LED Duration
**π― Objective:**
- Use the second button to **increase green LED time**.
- Use the third button to **confirm the green LED duration**.
### π Exercise 10: Final Integration
**π― Objective:**
- Combine all previous exercises into a **complete traffic light system**.
- Create a **video demo** showing all features.
- Submit the **final report and code**. ππ»
---
π οΈ **How to Use:**
1. **π₯ Clone this repository.**
2. **π₯οΈ Open the Proteus simulation files.**
3. **β‘ Flash the STM32 code onto your board.**
4. **π Enjoy controlling and testing the traffic light system!**
π₯ **Contributors:**
- Your Name Beckversync
π **License:**
HCMUT