This embedded systems project implements a fully functional Morse Code decoder using a Raspberry Pi Pico and various hardware components including a 7-segment display, buzzer, RGB LED, button, and potentiometer. The system interprets Morse inputs and outputs corresponding characters in real time.
This project fully satisfies all criteria defined in the COM1031 specification:
- Displays
8on the 7-segment display as a test, then turns off all LEDs. - Outputs a welcome message to the serial console on program start.
- Correct circuit connections (button, 7-segment display, buzzer, RGB LED, and potentiometer) based on the lab template.
- Button press durations interpreted correctly:
- dot < 250ms
- dash ≥ 250ms
- Gap durations between signals and letters handled precisely:
- Inter-signal gap < 400ms
- Inter-letter gap ≥ 400ms
- Correctly decodes and displays:
- 1-signal letters: E, T
- 2-signal letters: A, N, I, M
- 3-signal letters: S, U, R, W, D, K, G, O
- 4-signal letters: H, V, F, L, P, J, B, X, C, Y, Z, Q
- Displays decoded characters on:
- 7-segment display
- Serial terminal
- Inputs longer than 700ms or invalid Morse combinations trigger:
- Error message on serial console
- Display of
8on the 7-segment display
- Short beep for dot, long beep for dash
- Distinct negative sound if:
- Input time is exceeded
- Inputs cannot be decoded
- Green: valid character decoded
- Red: invalid or unrecognisable input
- Potentiometer allows real-time adjustment of the time limit per letter (default: 4s)
- Serial terminal displays the configured time limit
- System handles both increase and decrease in input time window
- After 4 valid characters:
- Displays decoded message in terminal
- Plays celebratory buzzer tune
- Prompt shown:
- Left button: Continue (reset components, restart input)
- Right button: Exit (shutdown components)
- RGB LED indicates:
- Green: Continue
- Red: Terminate
├── main.c # Main implementation of Morse decoder logic
├── hardware_setup.c # GPIO, timers, and peripheral initialisation
├── display.c # 7-segment display encoding logic
├── buzzer.c # Buzzer control logic
├── rgb_led.c # RGB LED control logic
├── morse_utils.c # Morse translation, mapping, and error handling
├── potentiometer.c # Time control setup and tuning
├── README.md # Project documentation