MSESP Morse Station
Back to portfolioDownload PDF
OPEN-SOURCE PROJECT DOCUMENTATIONFIRMWARE v4.0

One portable station.
A complete Morse lab.

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.

Platform
ESP32 Dev Module
Display
2.8-inch ILI9341 touch TFT
Source
One Arduino sketch
Published
30 July 2026
01 / OVERVIEW

A communication console,
learning tool, and game system.

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.

01

Morse tools

Learn, practice, translate, text playback, Web Morse, and Morse to Web.

02

Messaging

ESP-NOW Send and Inbox with a selectable station identity.

03

Local website

An offline Wi-Fi access point for two-way text and Morse exchange.

04

Touch interface

A touch-first menu with portrait and landscape layouts and an optional Back key.

05

Personalization

Six themes, brightness, WPM, sound, LED, orientation, and game levels.

06

Persistent data

Settings, calibration, learning statistics, and high scores survive restarts.

INPUTSTouch + Morse key
PROCESSORESP32 application system
OUTPUTSTFT + RGB + buzzer
+
CONNECTEDWeb + ESP-NOW + storage
02 / HARDWARE

The verified wiring map.

The display and touch controller share one SPI bus. Separate chip-select lines let the firmware address each device independently.

ESP32 pinConnectionPurpose
5V / VINTFT VCC and RGB module +5 V supply rail
GNDTFT GND, key return, buzzer returnCommon ground
GPIO2TFT DC / RSDisplay command/data selection
GPIO4TFT RSTDisplay reset
GPIO5TFT CSDisplay chip select
GPIO13Normally-open Morse key to GNDDedicated Morse input
GPIO14RGB module RRed PWM channel
GPIO15Touch T_CSXPT2046 chip select
GPIO18TFT SCK + touch T_CLKShared SPI clock
GPIO19TFT SDO + touch T_DOShared SPI MISO
GPIO23TFT SDI + touch T_DINShared SPI MOSI
GPIO25Optional Back button to GNDPhysical Back action
GPIO26RGB module BBlue PWM channel
GPIO32RGB module GGreen PWM channel
GPIO33Buzzer signal / positive leadMorse and interface tones
Not connectedTouch IRQFirmware uses polling
SHARED SPI

Initialize the bus once.

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.

RGB MODULE

Designed for the tested module.

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.

CONTROL CHANGE

Touch replaces navigation buttons.

GPIO14, GPIO32, and GPIO26 now drive RGB instead of Up, Down, and Select. GPIO13 remains the Morse key and GPIO25 can act as Back.

03 / FIRMWARE INSTALLATION

From sketch to first boot.

The public project stays in one file, touch_firmware.ino, so it remains approachable for classroom use and direct Arduino IDE uploads.

Required software

  • Board: ESP32 Dev Module
  • ESP32 package: Arduino-ESP32; tested with 3.3.10
  • Display: TFT_eSPI by Bodmer
  • Touch: XPT2046_Touchscreen by Paul Stoffregen
  • Built-in: SPI, WiFi, FS, WebServer, Preferences, esp_now
TFT_eSPI / USER_SETUP
Driver
ILI9341_DRIVER
MISO / MOSI / SCLK
19 / 23 / 18
CS / DC / RST
5 / 2 / 4
SPI frequency
27,000,000
  1. 01

    Install the ESP32 package and both external libraries.

  2. 02

    Apply the TFT_eSPI configuration shown above.

  3. 03

    Open touch_firmware.ino as the project source.

  4. 04

    Select ESP32 Dev Module and the correct serial port, then upload.

  5. 05

    Restart and complete the four-point touch calibration.

04 / INTERFACE & SETTINGS

Touch-first operation.

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.

THEMESTERM, AMBER, CYBER, AQUA, CANDY, XP
DISPLAYBrightness and portrait/landscape orientation
MORSEWPM timing, sound, and LED feedback
IDENTITYNamed ESP-NOW station IDs
GAMESIndependent difficulty for every game
RESETStatistics reset and factory restore

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.

05 / MORSE & COMMUNICATION

Learn locally. Communicate wirelessly.

The device combines classic Morse practice with an ESP32-hosted website and ESP-NOW messaging between compatible stations.

Learn

Browse characters and their dot-dash patterns.

Practice

Answer generated exercises at easy, medium, or hard difficulty.

Translate

Decode live Morse-key presses into text.

Text to Morse

Enter text with the on-screen keyboard and play it as Morse.

Web Morse

Show Morse received from the local website and its translation.

Morse to Web

Key a message, review the translation, and publish both to the browser page.

LOCAL WEBSITE

No internet required.

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.

Wi-Fi name
MorseStation
Password
morse1234
Address
http://192.168.4.1
Status refresh
Every 1 second
06 / GAMES & STATISTICS

Six games, one persistent record.

The Morse key becomes a physical game control where it makes sense, while touch handles movement, swipes, sequences, and direction.

Flappy

Press the Morse key to flap and score through gaps.

2048

Swipe to move and combine tiles.

Simon

Repeat the displayed touch sequence.

Space Fighter

Move with touch zones and shoot with the Morse key.

Donkey Kong

Use touch movement and actions across platforms.

Pac-Man

Navigate the maze with touch directions and collect points.

LEARNINGCharacters typed, accuracy, practice time, fastest WPM, longest session
GAMESA high score for every included game
STORAGEESP32 Preferences / NVS survives restart
07 / SOFTWARE ARCHITECTURE

One sketch, cooperating subsystems.

An application state machine coordinates input, rendering, communication, feedback, storage, Morse timing, and game updates without blocking normal operation.

  1. 01Serve pending local website requests.
  2. 02Poll Back input and clear one-frame flags.
  3. 03Process Morse-key edges, dot/dash timing, and gaps.
  4. 04Read filtered touch samples and produce actions.
  5. 05Update communication, notifications, RGB, and buzzer.
  6. 06Update the active app or game.
  7. 07Redraw changed UI or the next animation frame.

AppState

Identifies the active screen.

DeviceStats

Stores learning and game records.

TouchCalibration

Keeps orientation-specific mappings.

MessagePacket

Supports ESP-NOW send and inbox data.

ButtonState

Unifies Back input and touch-generated actions.

08 / TROUBLESHOOTING

Common symptoms, direct fixes.

SymptomCorrection
Display remains blankApply the TFT_eSPI configuration below and confirm the display header orientation.
Touch does not respondUse touch CS on GPIO15, leave IRQ disconnected, and run calibration.
Touch is offset after rotationOpen Settings and calibrate the selected orientation.
Menu stops after SettingsUpload the current v4.0 sketch, which includes the return-state fix.
Every tap opens immediatelyUse v4.0: the first tap selects and the second tap opens.
Morse decoding feels wrongAdjust WPM and leave a clear gap between letters.
Website does not openJoin MorseStation with password morse1234, then open 192.168.4.1.
Morse is absent from the siteIn Morse to Web, tap SEND TO SITE after keying the message.
RGB colors are exchangedUse R=GPIO14, G=GPIO32, and B=GPIO26.
Old navigation buttons do nothingThis is expected: those pins now drive RGB. Use touch navigation.
09 / OPEN-SOURCE REFERENCE

Built to be studied and extended.

This documentation describes firmware v4.0 and the tested breadboard/carrier-board configuration dated 30 July 2026.

Recommended release

  • touch_firmware.ino - complete firmware
  • README - introduction, photos, wiring, upload steps
  • LICENSE - license and copyright notice
  • docs/ - guides, diagrams, PCB exports, presentations
  • hardware/ - PCB source, Gerbers, pin reference

Contribution areas

  • Morse learning and accessibility improvements
  • New responsive, touch-first games
  • ESP-NOW pairing and classroom features
  • Optional storage, RTC, sensors, and battery monitoring
  • PCB, enclosure, and mounting files
ESP MORSE STATION / FIRMWARE v4.0

Want the complete reference?

Download the original ten-page guide for the full build, operation, and software reference.

Download project guideReturn to portfolio