| Category | Details |
|---|---|
| Platform | nRF5340 Audio DK |
| Language | C |
This school project was a part of my third year Information Technology studies implements a traffic light control system on the nRF5340 Audio DK development board using C and an RTOS. The system simulates real-world traffic lights and demonstrates:
- Task-based embedded design
- Real-time scheduling
- Hardware input handling
- UART communication
- Performance measurement
- Automated testing
The goal of the project was to practice:
- Designing concurrent embedded software
- Using an RTOS to control multiple tasks
- Interfacing with hardware inputs (push buttons)
- Implementing serial communication (UART)
- Measuring task execution time
- Writing automated tests
| Component | Description |
|---|---|
| Traffic Light tasks | Control red, yellow, and green light states |
| Input Control | Handles pushbutton inputs (initial control method) |
| UART Control | Allows external control via serial communication |
| Scheduler (RTOS) | Manages task timing and execution |
| Timing for debug reasons | Measures how long tasks take to run |
The project was developed in stages, and weekly progress was documented in separate branches.
- Each traffic light controlled by a separate RTOS task
- Fixed timing cycle (Red → Green → Yellow)
- Board pushbuttons used to:
- Change light states
- Trigger events
- Introduced event-based task interaction
- Serial interface implemented
- Traffic lights could be controlled from a PC terminal
- Enabled more complex task interactions
- New tasks like user set lights sequence introduced to extend system functionality
- Google tests and Robot Framework testing were made to validate functionality
Task execution timing was measured to analyze real-time behavior. Method used:
- Timestamps captured before and after task execution
- Execution duration calculated
- Used for:
- Debugging
- Performance validation
Used to test:
- Traffic light state logic
- Utility/helper functions
Used for higher-level testing such as:
- System behavior validation
- Command handling through UART
Through this project, the following skills were developed:
- RTOS-based system design
- Multitasking in embedded systems
- Serial communication
- Performance measurement
- Writing automated tests