Project Overview
This build turns an Arduino into a morse code translator that flashes LEDs and plays tone output based on typed input. You'll learn about digital I/O, timing functions, and mapping ASCII characters to dot-dash sequences.
Required Components
- Arduino Uno or compatible board.
- Breadboard, jumper wires, 220Ω resistor.
- LED, passive buzzer or speaker, USB cable.
- Optional: OLED display for message output.
Wiring Diagram
Connect the LED to digital pin 9 with a resistor to ground. Attach the buzzer to pin 10. Both pins share a common ground. Optional shields or displays connect via I2C on pins A4/A5.
Core Sketch
Start by mapping characters to dot-dash strings using a dictionary object. Use tone()
for audio output and digitalWrite()
for LED flashes, timed with delay()
or millis()
for non-blocking loops.
Troubleshooting Tips
- Verify ground connections first when the LED does not flash.
- Use the serial monitor to inspect character mappings.
- Debounce button inputs by sampling at fixed intervals.
- Experiment with Farnsworth timing to improve readability.
Next Steps
Package your project in a 3D-printed enclosure, add battery power, or integrate Bluetooth for wireless messaging. Each extension reinforces coding fundamentals while keeping the morse tradition alive.