๐Ÿ–ฅ๏ธ Hardware Components

Raspberry Pi board

Raspberry Pi

A small, affordable single-board computer. This project works with Pi 3, 4, or 5. It runs a full Linux operating system and connects to all the peripherals.

Main Computer
Sense HAT add-on board with 8x8 LED matrix

Sense HAT

An add-on board that sits on top of the Pi. It has an 8ร—8 RGB LED matrix, a joystick, and sensors for temperature, humidity, and orientation. We use the LED grid to display decoded letters.

LED Display
๐Ÿ–ฑ๏ธ

USB Mouse

The primary input device. Left click for dots, long-press for dashes, right click to complete a message. Simple and intuitive.

Input Device
๐Ÿ”Š

Speaker / Audio Output

Connected via the Pi's audio jack or HDMI. Plays beep sounds for dots and dashes, and reads the completed message aloud using text-to-speech.

Audio Output
๐Ÿ–ฅ๏ธ

HDMI Display

Shows the fullscreen pygame interface with the current Morse input, decoded characters, word list, and instructions.

Visual Display

๐Ÿ’ป Software & Libraries

๐Ÿ

Python 3

The programming language for the entire project. Python is beginner-friendly, widely used in education, and has excellent library support for Raspberry Pi hardware.

๐ŸŽฎ

Pygame

Handles the fullscreen graphical display, mouse event detection (clicks, long presses), and audio playback. It provides the main event loop that drives the application.

๐ŸŒก๏ธ

sense-hat Library

The official Python library for the Sense HAT. Used to control the 8ร—8 LED matrix โ€” displaying individual letters, scrolling messages, and showing Morse code patterns.

๐Ÿ—ฃ๏ธ

pyttsx3 + espeak

Text-to-speech engines. pyttsx3 is the primary TTS library; espeak serves as a fallback. When you complete a message, the Pi reads it aloud.

๐Ÿ”ข

NumPy

Used for audio synthesis โ€” generating sine waves for beep sounds and the Mario celebration tune. Creates precise waveforms with attack/decay envelopes for clean audio.

๐Ÿงต

Threading

Python's built-in threading module keeps the UI responsive. Timeout monitoring, audio playback, and LED display updates all run in separate threads with proper locking.

๐Ÿ—๏ธ System Architecture

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  USB Mouse   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚          Pygame Event Loop            โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚  (click detection, timing, display)   โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚          โ”‚          โ”‚
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚  Morse   โ”‚ โ”‚  Audio   โ”‚ โ”‚  Sense HAT โ”‚
                      โ”‚  Decoder โ”‚ โ”‚  Engine  โ”‚ โ”‚  LED Matrixโ”‚
                      โ”‚ (dict)   โ”‚ โ”‚ (numpy)  โ”‚ โ”‚ (sense-hat)โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚          โ”‚
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚   Text-to-Speech       โ”‚
                      โ”‚   (pyttsx3 / espeak)   โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      

๐Ÿค” Why These Choices?

Why Raspberry Pi?

It's affordable (around $35โ€“75), runs a full OS, has GPIO pins for hardware projects, and has a massive community. Perfect for learning.

Why Python?

It's the most popular language for Pi projects, reads almost like English, and has libraries for everything we need โ€” from hardware control to audio synthesis.

Why a Mouse (not buttons)?

A USB mouse is something every household has. No soldering, no breadboards, no extra wiring. Plug it in and start clicking Morse code immediately.

Why Sense HAT?

It snaps directly onto the Pi โ€” no wiring needed. The 8ร—8 LED matrix is perfect for displaying single characters, and it's officially supported with a well-documented library.