I. Introduction
Morse code is one of the earliest and most enduring forms of digital communication, developed by Samuel Morse and Alfred Vail. It represents letters, numbers, and symbols through sequences of short and long signals, commonly referred to as “dots” and “dashes.” (Shown in the
Figure 1.) Morse code, by convention, had been transmitted by telegraph keys, flashing lamps, or tone sounds, and for many decades had been the foundation of long-distance communication. Although formally invented historically, Morse code endures today due to the simplicity, the universality, and the fact that it conveys information despite limited resources.
In this work, for the purposes of providing a Morse code input and transmission system for a modern IoT application, a system employing an ESP32 microcontroller is presented. Contrary to the traditional model whereby a one-button configuration operates and the user must accurately time presses between the dot and dash, this system provides a user-friendlier input procedure. Dots and dashes each have a dedicated button: one for the dots and one for the dashes. A third acts as the transmit button for the compiled message. The methodology eliminates the need for accurate timing, reduces the risk for the human, and makes learning less intimidating for the less-skilled user employing the traditional Morse keying. The system operation is simple. The dot or dash button press respectively adds the associated symbol to the current Morse sequence. The sequence is decoded for an alphabetic character when a short idle time is sensed. The characters thus built up are added to give words or sentences. When the user depresses the send button, the decoded message is sent by a secure connection through the ESP32 via Wi-Fi to a Telegram bot, which immediately deposits the message in a chosen chat. For debugging purposes, all inputs and decoded characters also appear on the Serial Monitor.
The union of the Morse code with the Telegram communication app provides a few real-world applications. The device can act as a communication assistant for those with special needs for whom the use of buttons as opposed to full keyboards would be easier. The system may also find use when teaching students Morse code as a form of interactive and fun learning. Due to the compact structure of the hardware, the device allows for great mobility and has the capability of being used for passing secret information without raised attention, providing potential usage when it comes to matters of security or stealth communication.
In conclusion, the system marries the classic ease of Morse code with the present-day functionality of IoT and instant messaging platforms. Utilizing two special buttons for dot and dash improves usability, while the ESP32 guarantees smooth connectivity and inexpensive implementation. What emerges is a tiny, portable, and handy device that illustrates how old-fashioned communication techniques may be re-designed to suit modern purposes.
III. Proposed System
The proposed system is a compact communication device that merges simple Morse code with the networking capabilities of a typical IoT device. Conventional Morse code transmission requires a single button in which the user holds down the button for the duration of the time they want to signal dot or dash, and to complicate this, Morse uses spaces as well, either between letters or words. This proposed method provides three buttons. One button will generate the dot letter indicator, one will generate the dash letter indicator, and the third will signal the completed message signal to be sent. This variation of transmission will reduce the need for timing precision and reduces the opportunity of a user being incorrect. Therefore, it is more accessible for someone who has never used a typical telegraph key to input Morse code.
The ESP32 microprocessor is the processing unit, receiving input from the user buttons, decoding the Morse into letters, and sending the messages. Once the user has generated a message, the text generated from the Morse is sent securely and over Wi-Fi to a bot connected to telegram which delivers it instantly to a designated chat. Therefore, there is access to communications anywhere in the world because the user has Telegram on their device to receive the decoded Morse message. The whole system is low-cost, energy-efficient, and portable, making a great solution for anything from emergencies, assisting technology, education, and easily communicating discreet or covert messages.
Figure 3.
Graphical Circuit Diagram.
Figure 3.
Graphical Circuit Diagram.
A. System Design and Architecture
The system architecture consists of three layers: input, processing, and communication. Three physical push buttons in the input layer read user input: dot, dash, and send. These are connected to the ESP32’s GPIO pins with internal pull-up resistors to ensure stable signal detection.
In the processing layer, the ESP32 interprets button presses and builds Morse sequences. A time-based idle mechanism (2 seconds) identifies the end of each character and triggers the decoding of the Morse sequence into its alphanumeric counterpart. The decoded character is appended to a message buffer, which is refreshed constantly as additional symbols are input by the user.
The ESP32 sends messages encrypted using its onboard Wi-Fi module and the Universal Telegram Bot API in the communication layer. HTTPS protocol takes care of the data integrity since the Telegram bot can send the message directly into a given chat ID. For transparency, the system prints debugging data to the Serial Monitor as well. This information includes any button clicks, Morse codes, decoded characters, and even confirmation of sent messages.
The layer architecture demonstrates modularity; for instance, the input device could be easily replaced by a different sensor (e.g., touchpads or blink sensors) and would not even necessitate changing the communication layer.
Figure 4.
Flowchart of the System.
Figure 4.
Flowchart of the System.
B. Implementation
The system was implemented with the Arduino IDE supporting ESP32 development. Libraries WiFi.h, WiFiClientSecure.h, UniversalTelegramBot.h, and ArduinoJson.h were utilized for connectivity and messaging purposes. The secure bot token and chat ID, retrieved from Telegram’s BotFather, were included in the code for direct communication purpose.
Figure 5.
Snippet of Library function and Bot Configuration.
Figure 5.
Snippet of Library function and Bot Configuration.
For button input handling, presses were read with digitalRead() and debounced with a 100 ms wait to prevent multiple triggers. A press added either “.” or “–” to the Morse sequence, with direct logging to the Serial Monitor for debugging purposes. In absence of a button press within 2 seconds, the system treated it as the end of a character and decoded the sequence by calling a lookup function for International Morse Code. Any unrecognized sequence was substituted with “?”.
Figure 6.
Snippet of morse code function.
Figure 6.
Snippet of morse code function.
If the send button was clicked, the message in the buffer was sent by the API and Wi-Fi client to the Telegram bot. The transfer time of the message would typically be between 1-2 seconds based on network conditions, and the message delivered would be shown in the Serial Monitor. Once the message had been sent off, the message was flushed from the buffer in anticipation of new input.
The prototype validated that the system offers proper Morse decoding and guaranteed message transmission via Telegram. The hardware’s compactness and simplicity, along with real-time global messaging functionality, make this proposed system feasible for day-to-day and emergency communication.
IV. Results and Analysis
The proposed Morse code transmission system in this paper incorporates hardware input, software decoding, and wireless transmission over Telegram. The three push buttons for dot, dash, and send message are constantly monitored by an ESP32 microcontroller. The state of each press is immediately debounced and buffered into a temporary Morse sequence. Real-time indicators of the pressed buttons are also displayed on the Serial Monitor. For instance, typing “.-” shows up as “Dot pressed” and “Dash pressed,” which, after a brief idle time, gets decoded into the character A. Several characters get buffered into a message buffer, and clicking the send button causes the ESP32 to package and send the message over the Telegram Bot API securely over a HTTPS connection. The decoded text shows up as a message in the receiver’s Telegram chat within a few seconds, providing fast and reliable communication.
Figure 7.
Hardwire Prototype.
Figure 7.
Hardwire Prototype.
Figure 6 depicts the system’s hardware prototype consisting of the ESP32 development board interfaced with three tactile push buttons as shown on a breadboard. The compact form illustrates the system’s potential for miniaturization and eventual integration into a handheld unit.
Figure 8.
Serial Monitor output.
Figure 8.
Serial Monitor output.
Figure 7 shows an example of the output on the Arduino Serial Monitor. In this case, the user pressed the dot button once, and the dash button once, thus creating a sequence of “.-”. After two seconds of no input (there is a pause), the machine subsequently interpreted the sequence and displayed the text “Character decoded: A.” You are able to type sequences one after the other to form words such as “HELLO.” Each action that you perform can be seen on the Serial Monitor, step by step.
Figure 3.
Telegram chat output.
Figure 3.
Telegram chat output.
Figure 8 shows the Telegram chat output, which resulted from the successful transmission of the Morse code typed last. For instance, after typing the Morse sequence for the word “HELP” and clicking the send button, the word “HELP” appeared in the Telegram chat window in less than two seconds. This ensures not only local Morse input processing by the system but also successful delivery of the Morse input to a remote platform.
The end-to-end operation of the system reduces the complexity. From the moment the button is pressed until the last message reaches the user, the whole sequence of operations is intuitive, extremely fast, and extremely accurate. The system does away with the time complexities inherent in the older Morse keying, and the Telegram integration makes the system operational from any place with internet connectivity. This aspect makes the device highly effective for applications like emergency alerts, secret communication, and assistive communication for those who may not easily use the keyboard.
V. Conclusion and Future Prospects
Morse code transmission using ESP32 system presented herein solely illustrates a transportable, effective, and uncomplicated mode of message transmission through Telegram. The system reduces the timing errors of the Morse keying by the inclusion of special dot, dash, and send buttons, thus making communication less intimidating for beginners. The Telegram compatibility ensures real-time message delivery anywhere in the world, thus rendering the device fit for the case of emergency communication, assistive technology, learning, as well as covert or surreptitious message communication by virtue of the compactness.
To further the future potential, the system may also be improved by the inclusion of LoRa communication for enabling long-distance transmission without the use of the internet, thus becoming effective when used in remote or disaster-affected communities. The system may also be further advanced by the use of AI/ML algorithms for the incorporation of an autocorrect capability that identifies and corrects Morse input mistakes for increased correctness and usability. These would further widen the applicability of the system reliability in the real world.
References
- L. P. Carron, Morse Code: The Essential Language. Newington, CT: American Radio Relay League, 1986.
- P. Nalajala, B. Godavarthi, M. L. Raviteja, and D. Simhadri, “Morse Code Generator Using Microcontroller with Alphanumeric Keypad,” in Proc. Int. Conf. on Electrical, Electronics, and Optimization Techniques (ICEEOT), pp. 762–766, 2016.
- A. Banerjee, R. Singh, and S. Ghosh, “A Novel Approach of Arduino UNO Based Morse Code Generation,” International Journal of Engineering Research & Technology (IJERT), vol. 10, no. 5, pp. 112–116, 2021.
- S. S. Tevaramani, P. R. Naik, and R. Kulkarni, “Morse Code Decoder Using Arduino,” International Journal of Advanced Research in Computer and Communication Engineering (IJARCCE), vol. 13, no. 4, pp. 45–49, 2024.
- A. Gueorguieva, G. Rakhmetulla, and A. S. Arif, “Enabling Input on Tiny/Headless Systems Using Morse Code,” arXiv preprint, arXiv:2012.06708, 2020. [CrossRef]
- A. Bhatt, “Blink-to-Code: Real-Time Morse Code Communication via Eye Blink Detection and Classification,” arXiv preprint, arXiv:2508.09344, 2025.
- O. Y. Hutajulu, M. D. Mendoza, and Y. Simamora, “Feasibility Study of Smart House Design with ESP32 and Telegram in a Simple House,” in Proc. Int. Conf. on Emerging Applications and Innovations (EAI), pp. 112–118, 2022.
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).