Project page: https://huggingface.co/spaces/Anirudh1950/MorseMatrix
Morse Code Encoder/Decoder with LCD Display
A versatile Arduino project that converts text to Morse code and vice versa, featuring an LCD display and audio output. This project supports letters, numbers, and special characters, with additional features like ROT-13 encoding and interactive modes.
Table of Contents
Features
- Text to Morse Code Conversion: Converts any text input to Morse code
- Morse to Text Decoding: Decodes Morse code back to text
- Audio Output: Plays Morse code through a speaker
- ROT-13 Encoding: Includes ROT-13 text transformation
- LCD Display: Shows both Morse code and ROT-13 output
- Serial Monitor Interface: For easy input/output
- Auto-scrolling: For messages longer than the display width
- Special Character Support: Handles common punctuation and symbols
Hardware Requirements
- Arduino board (Uno, Nano, or similar)
- 16x2 LCD display (with or without I2C)
- Speaker or buzzer (8Ξ©, 0.5W)
- Jumper wires
- Breadboard
- 10KΞ© potentiometer (for LCD contrast adjustment)
- 220Ξ© resistor (for speaker)
Circuit Diagram
Connections
LCD Display (16x2)
| LCD Pin | Arduino Pin |
|---|---|
| VSS | GND |
| VDD | 5V |
| V0 | Potentiometer center pin |
| RS | 12 |
| RW | GND |
| EN | 11 |
| D4 | 2 |
| D5 | 3 |
| D6 | 4 |
| D7 | 5 |
| A | 5V |
| K | GND |
Speaker
- Positive terminal β 220Ξ© resistor β Digital Pin 6
- Negative terminal β GND
Potentiometer
- Left pin β 5V
- Right pin β GND
- Center pin β LCD V0
Installation
- Connect all components as per the wiring diagram
- Open the
Morse.inofile in Arduino IDE - Select the correct board and port from the Tools menu
- Upload the sketch to your Arduino
Usage
- Open the Serial Monitor (Ctrl+Shift+M or Tools > Serial Monitor)
- Ensure the baud rate is set to 9600
- Type your message and press Enter
- The message will be:
- Displayed in Morse code on the top line of the LCD
- Shown in ROT-13 on the bottom line
- Played as audio through the speaker
- Printed to the Serial Monitor with input and decoded output
Morse Code Timing
- Dot: 1 unit (200ms by default)
- Dash: 3 units
- Space between elements: 1 unit
- Space between characters: 3 units
- Space between words: 7 units
Supported Characters
- Letters: A-Z (case insensitive)
- Numbers: 0-9
- Special Characters: Space, ., , ? / @ : ; ( ) & = + _ " ' !
Customization
You can adjust the following constants in the code:
dotLength: Duration of a dot in milliseconds (default: 200ms)speakerPin: Pin connected to the speaker (default: 6)scrollDelay: Time between display scrolls (default: 500ms)
Troubleshooting
- No Display: Check contrast adjustment and connections
- No Sound: Verify speaker connections and try a different pin
- Garbled Text: Ensure baud rate is set to 9600 in Serial Monitor
Future Enhancements
- Menu system for different operations
- Practice mode with random words
- Adjustable speed control
- Message storage using EEPROM
- Battery level indicator
- LCD brightness control
License
This project is open source and available under the MIT License.
Author
Anirudh Bharadwaj anirudh21india@gmail.com
Source code: https://github.com/rudzz1950/MorseMatrix
Run locally
pip install -r requirements.txt
python app.py
app.py is a Gradio app; the original project scripts are unchanged alongside it.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
