Overview
Morse Code - Decode & Chat is a cross-platform mobile app that turns your phone into a real-time morse code transceiver. Point your camera at any flashing light source to decode morse code instantly. Transmit messages via flashlight or screen flash. Have two-way conversations between phones using light. The app also includes an interactive learning mode and a complete morse code reference guide. It works entirely offline with no internet required.
My Role
I designed, built, and shipped the entire application solo — from the camera frame processing pipeline and signal detection algorithms to the binary protocol with error correction and the chat interface. I also built the marketing website at morsesignals.com and handled App Store and Play Store submissions.
Architecture
The app uses react-native-vision-camera with react-native-worklets-core for real-time camera frame processing at 30fps. Brightness is sampled from the center of each frame and fed into a custom morse decoder hook that detects dot/dash patterns based on timing thresholds. For transmission, an async sleep loop drives the torch or screen flash. The binary protocol layer sits on top, using Manchester encoding for clock recovery and CRC-8/CCITT checksums for error detection. A protocol state machine handles the receiver pipeline: IDLE → SYNC → HEADER → PAYLOAD → CRC → VALIDATE. The app auto-detects whether incoming signals are standard morse or binary packets.
Hard Problems
- Real-time brightness sampling from camera frames on the UI thread would cause frame drops. Solved by offloading frame processing to native worklets that run outside the JavaScript thread.
- Morse code timing detection is ambiguous — a dot at one speed looks like a dash at another. Built adaptive timing that calibrates based on observed signal patterns.
- Reliable data transfer over light is inherently noisy. Designed a binary protocol with Manchester encoding for embedded clock recovery and CRC-8 checksums, achieving reliable communication even in variable lighting conditions.
- React Native has no TextEncoder/TextDecoder. Built custom UTF-8 encode/decode functions to support the binary protocol's payload handling.
- Photosensitive epilepsy safety — implemented hardware-limited flash frequencies, screen-only safe mode, and mandatory safety warnings on every app launch.
Key Features
- Real-time camera-based morse code decoding with adjustable threshold, zoom (up to 10x), and exposure controls
- Flashlight and screen flash transmission with 4 speed presets (6-24 WPM) and 24 quick-tap message presets
- Two-way light chat between phones with familiar messaging interface and timestamps
- Audio morse via speaker and microphone as an alternative channel
- Error-corrected binary protocol with Manchester encoding and CRC-8 checksums
- Interactive learning mode with quizzes, accuracy tracking, and streak scoring
- Complete A-Z and 0-9 morse code reference guide with timing rules
- Works completely offline with no ads
What I'd Improve
Add a daily quiz/challenge mode to drive retention and give users a reason to return. Implement Firebase analytics and attribution tracking for measuring ad campaign performance. The binary protocol could support larger payloads with packet fragmentation and reassembly. Audio decoding accuracy could be improved with FFT-based frequency detection instead of simple amplitude thresholds.