🎙️ Part of the oeradio.at open source ham radio tool collection. Browse all tools → oeradio.at/werkzeuge
Morse Code Naval Battle Trainer - Learn Morse code while playing battleship against the computer!
MorseFleet is an interactive web-based game that combines the classic battleship game with Morse code learning. Players input coordinates using a Morse key (or spacebar) and engage in turn-based naval combat against a computer opponent.
Live Demo: https://morsefleet.oeradio.at/
- Ship Placement Phase: Place your 6 ships on a 7x7 grid
- Click to place, press R to rotate
- Random placement option available
- Turn-Based Combat: You shoot, then the computer shoots back
- Win/Lose Conditions: First to sink all enemy ships wins
- Physical Morse key simulation (click or hold spacebar)
- Short press = dot (.), Long press = dash (-)
- Automatic character recognition after pause
- Audio feedback with authentic Morse tones
- USB HID (Keyboard Emulation) - Works in all browsers
- Connect real CW paddles via USB HID adapters
- Compatible with VBand, Pi Pico (pico_vband), and similar devices
- Configurable key presets (VBand, morsecode.me, custom)
- Web Serial API - Chrome/Edge only
- Direct USB serial connection for Morserino-32 or DIY Arduino adapters
- Multiple protocols: Simple Binary, ASCII, Morserino
- Configurable baud rate (9600-115200)
- Multiple keyer modes:
- Straight Key: Manual timing of all elements
- Bug (Semi-Auto): Automatic dits, manual dahs
- Iambic A/B: Alternating dits and dahs with squeeze keying
- Ultimatic: Last paddle pressed takes priority
- Adjustable keyer speed (10-30 WPM)
- Click ⚙️ in the status bar to configure
- Hunt-and-target algorithm
- Checkerboard pattern for efficient hunting
- Line tracking when multiple hits detected
- German (Deutsch)
- English
- Slovenian (Slovenščina)
- Normal Mode: Uses letters A-G and numbers 1-7 (2 Morse characters per coordinate)
- Advanced Mode: Uses letter pairs AB-MN and number pairs 01-13 (4 Morse characters per coordinate)
- Learn the full alphabet A-N and all digits 0-9
- Adjustable speed (10-25 WPM)
- Interactive tutorial with live demo
- Autoplay mode to watch the game play itself
- Built-in Morse code reference (updates based on game mode)
- Mobile-responsive design
- No cookies, no tracking
-
Place Your Ships: Click on the left grid to place ships. Press R to rotate. Click "Confirm Fleet" when done.
-
Enter Morse Code: Hold the Morse key (or spacebar):
- Short press (<200ms) = dot
- Long press (>200ms) = dash
- Pause to finalize character
-
Send Coordinates: Enter a letter (A-G) + number (1-7), e.g., "B3", then click "Send"
-
Interpret Response:
- W (.--) = Water (miss)
- S (...) = Hit
- K (-.-) = Sunk
-
Survive: Watch for incoming enemy fire on your fleet grid!
Letters: Numbers:
A = .- 1 = .----
B = -... 2 = ..---
C = -.-. 3 = ...--
D = -.. 4 = ....-
E = . 5 = .....
F = ..-. 6 = -....
G = --. 7 = --...
Letters: Numbers:
A = .- H = .... 0 = -----
B = -... I = .. 1 = .----
C = -.-. J = .--- 2 = ..---
D = -.. K = -.- 3 = ...--
E = . L = .-.. 4 = ....-
F = ..-. M = -- 5 = .....
G = --. N = -. 6 = -....
7 = --...
8 = ---..
9 = ----.
MorseFleet supports real CW paddles and keys. See HARDWARE_KEY_SUPPORT.md for detailed build guides.
| Method | Browser Support | DIY Cost | Difficulty |
|---|---|---|---|
| USB HID (Pi Pico) | All browsers | ~$5 | Easy |
| USB HID (VBand) | All browsers | ~$25 | Plug & Play |
| USB Serial (Arduino) | Chrome/Edge only | ~$5 | Easy |
| Morserino-32 | Chrome/Edge only | ~$120 | Plug & Play |
For Chrome/Edge users, build a simple serial adapter:
Hardware:
- Arduino Nano (~$5) or any Arduino with USB
- 3.5mm stereo jack (~$0.50)
Wiring:
Arduino Nano 3.5mm TRS Jack
D2 ─────────────── Tip (Dit)
D3 ─────────────── Ring (Dah)
GND ─────────────── Sleeve (Ground)
Firmware (upload via Arduino IDE):
const int DIT_PIN = 2, DAH_PIN = 3;
byte lastState = 0;
void setup() {
pinMode(DIT_PIN, INPUT_PULLUP);
pinMode(DAH_PIN, INPUT_PULLUP);
Serial.begin(115200);
}
void loop() {
byte state = (!digitalRead(DIT_PIN) << 1) | !digitalRead(DAH_PIN);
if (state != lastState) {
Serial.write(state);
lastState = state;
}
delay(5);
}In MorseFleet: Settings ⚙️ → Serial (USB) → Baud: 115200 → Protocol: Simple Binary → Connect
- Single-file SPA: Everything in one HTML file (~7000 lines)
- No dependencies: Pure HTML, CSS, JavaScript
- Web Audio API: For Morse tone generation
- Web Serial API: Direct serial port access (Chrome/Edge)
- LocalStorage: For language preference and key settings
- Docker-ready: Includes Dockerfile and nginx config
morsefleet/
├── morsefleet.html # Main application (single-file SPA)
├── config.json # Optional parent site branding
├── nginx.conf # Nginx configuration
├── Dockerfile # Docker build configuration
├── docker-entrypoint.sh # Container startup script
├── deploy-production.sh # Deployment script
├── HARDWARE_KEY_SUPPORT.md # Hardware Morse key implementation docs
└── README.md # This file
Simply open morsefleet.html in a browser - no server required.
docker build -t morsefleet .
docker run -d -p 80:80 morsefleet./deploy-production.shOptional config.json for parent site branding:
{
"parentSiteUrl": "https://example.com",
"parentSiteLogo": "logo.png",
"parentSiteName": "Example Site"
}- Game Rules: Based on rules by Radioklub Vegova (S59VEG)
- Developer: Michael Linder (OE8YML)
MIT License - See source code for details.
73 de OE8YML - Good luck and have fun learning Morse code!