Morse tools
Learn, practice, translate, text playback, Web Morse, and Morse to Web.
A self-contained ESP32 Morse terminal with a touch interface, dedicated key, local website, ESP-NOW messaging, learning tools, persistent statistics, RGB feedback, and six games.
The station translates keyed Morse, plays text as Morse, exchanges messages between compatible stations, hosts an offline browser interface, and records practice and game progress.
Learn, practice, translate, text playback, Web Morse, and Morse to Web.
ESP-NOW Send and Inbox with a selectable station identity.
An offline Wi-Fi access point for two-way text and Morse exchange.
A touch-first menu with portrait and landscape layouts and an optional Back key.
Six themes, brightness, WPM, sound, LED, orientation, and game levels.
Settings, calibration, learning statistics, and high scores survive restarts.
The display and touch controller share one SPI bus. Separate chip-select lines let the firmware address each device independently.
| ESP32 pin | Connection | Purpose |
|---|---|---|
5V / VIN | TFT VCC and RGB module + | 5 V supply rail |
GND | TFT GND, key return, buzzer return | Common ground |
GPIO2 | TFT DC / RS | Display command/data selection |
GPIO4 | TFT RST | Display reset |
GPIO5 | TFT CS | Display chip select |
GPIO13 | Normally-open Morse key to GND | Dedicated Morse input |
GPIO14 | RGB module R | Red PWM channel |
GPIO15 | Touch T_CS | XPT2046 chip select |
GPIO18 | TFT SCK + touch T_CLK | Shared SPI clock |
GPIO19 | TFT SDO + touch T_DO | Shared SPI MISO |
GPIO23 | TFT SDI + touch T_DIN | Shared SPI MOSI |
GPIO25 | Optional Back button to GND | Physical Back action |
GPIO26 | RGB module B | Blue PWM channel |
GPIO32 | RGB module G | Green PWM channel |
GPIO33 | Buzzer signal / positive lead | Morse and interface tones |
Not connected | Touch IRQ | Firmware uses polling |
The sketch calls SPI.begin(18,19,23) once, shares that initialized bus with the touch library, and keeps TFT and touch on separate chip-select pins.
The working prototype uses a 5 V common-anode RGB module with onboard resistors. Connect + to 5 V and R/G/B to GPIO14, GPIO32, and GPIO26.
GPIO14, GPIO32, and GPIO26 now drive RGB instead of Up, Down, and Select. GPIO13 remains the Morse key and GPIO25 can act as Back.
The public project stays in one file, touch_firmware.ino, so it remains approachable for classroom use and direct Arduino IDE uploads.
Install the ESP32 package and both external libraries.
Apply the TFT_eSPI configuration shown above.
Open touch_firmware.ino as the project source.
Select ESP32 Dev Module and the correct serial port, then upload.
Restart and complete the four-point touch calibration.
Tap once to select an app and tap the selected app again to open it. On-screen Back controls and the optional GPIO25 button return to the previous screen.
Touch calibration is stored independently for portrait and landscape. The firmware polls the XPT2046, rejects low-pressure readings, filters samples, and maps raw coordinates onto the active logical screen.
The device combines classic Morse practice with an ESP32-hosted website and ESP-NOW messaging between compatible stations.
Browse characters and their dot-dash patterns.
Answer generated exercises at easy, medium, or hard difficulty.
Decode live Morse-key presses into text.
Enter text with the on-screen keyboard and play it as Morse.
Show Morse received from the local website and its translation.
Key a message, review the translation, and publish both to the browser page.
Join the device access point from a phone, laptop, or classroom display. The browser interface exchanges text and Morse with the station while the ESP32 serves the entire page locally.
The Morse key becomes a physical game control where it makes sense, while touch handles movement, swipes, sequences, and direction.
Press the Morse key to flap and score through gaps.
Swipe to move and combine tiles.
Repeat the displayed touch sequence.
Move with touch zones and shoot with the Morse key.
Use touch movement and actions across platforms.
Navigate the maze with touch directions and collect points.
An application state machine coordinates input, rendering, communication, feedback, storage, Morse timing, and game updates without blocking normal operation.
Identifies the active screen.
Stores learning and game records.
Keeps orientation-specific mappings.
Supports ESP-NOW send and inbox data.
Unifies Back input and touch-generated actions.
| Symptom | Correction |
|---|---|
| Display remains blank | Apply the TFT_eSPI configuration below and confirm the display header orientation. |
| Touch does not respond | Use touch CS on GPIO15, leave IRQ disconnected, and run calibration. |
| Touch is offset after rotation | Open Settings and calibrate the selected orientation. |
| Menu stops after Settings | Upload the current v4.0 sketch, which includes the return-state fix. |
| Every tap opens immediately | Use v4.0: the first tap selects and the second tap opens. |
| Morse decoding feels wrong | Adjust WPM and leave a clear gap between letters. |
| Website does not open | Join MorseStation with password morse1234, then open 192.168.4.1. |
| Morse is absent from the site | In Morse to Web, tap SEND TO SITE after keying the message. |
| RGB colors are exchanged | Use R=GPIO14, G=GPIO32, and B=GPIO26. |
| Old navigation buttons do nothing | This is expected: those pins now drive RGB. Use touch navigation. |
This documentation describes firmware v4.0 and the tested breadboard/carrier-board configuration dated 30 July 2026.
touch_firmware.ino - complete firmwareREADME - introduction, photos, wiring, upload stepsLICENSE - license and copyright noticedocs/ - guides, diagrams, PCB exports, presentationshardware/ - PCB source, Gerbers, pin referenceDownload the original ten-page guide for the full build, operation, and software reference.