Close
0%
0%

Morse Quest: An Arduino Nano-Based Text Adventure

Engage in a minimalized text adventure game using Morse code via an LED and button on an Arduino Nano.

Similar projects worth following
"Morse Quest" is a minimalist text adventure game built on an Arduino Nano platform, where all interactions take place using Morse code.

The game communicates with the player through a blinking LED that outputs messages in Morse code. Players must decipher these blinks into text, unraveling the storyline, clues, and challenges the game presents. In turn, players respond by pressing a button to input their Morse-coded commands, which the Arduino Nano interprets and processes to advance the game. The algorithm interpreting the inputs is fully adaptive to the players input speed and does not rely on hardcoded thresholds. Powered by a 9V battery, the system is fully portable.

Players can adjust the blinking speed of the LED with a potentiometer to match their comfort level, making the game accessible to both beginners and seasoned Morse code enthusiasts.

The original story is called "The Abandoned Farmhouse Adventure" by Jeff Tranter.

body.stl

Standard Tesselated Geometry - 126.06 kB - 08/31/2024 at 08:16

Download

cap.stl

Standard Tesselated Geometry - 714.34 kB - 08/31/2024 at 08:16

Download

  • 1 × Arduino Nano
  • 1 × LED Fiber Optics / Emitters
  • 1 × Button
  • 1 × 10k Potentiometer
  • 1 × 9V Battery

View all 6 components

  • 1
    Wire Components

    Wire components following the Image. You can use any Arduino-like device.

    • Potentiometer at analog input 7
    • LED with resistor at digital pin 3
    • Switch at digital pin 6, while pin 6 connected to ground via a 1k resistor
  • 2
    Upload Sketch
  • 3
    Start up your microcontroller and start decoding!

    After you started, the game begins and the LED will blink, so you need to start decoding. You can vary the output speed by changing the value of the potentiometer. GL & HF!

    Commands:

    • LOOK
    • INVENTORY
    • GO[...]
    • TAKE[...]
    • DROP[...]
    • EXAMINE[...]
    • USE[...]

View all 3 instructions

Enjoy this project?

Share

Discussions

roska wrote 09/03/2024 at 08:54 point

I uploaded the code to an openCwKeyer Mk2. I just changed the pin numbers: 

buttonPin=2

ledPin=4 

analogPin=A0

and inverted the button, because in the openkeyer, the key pulls the pin to ground.

This way I can use my straight key and the code is sent with the buzzer of the keyer. I understand that it is nice to have a silent device, but to really learn the code, it has to be a tone.  Additionally I added a few characters: . , - ?!

  Are you sure? yes | no

roska wrote 09/03/2024 at 12:14 point

I noticed, that the timing is not correct. A dash should be 3 times a dot, the inter-character space should be equal to a dot, the space between letters should be 3x dot, and space between words should be 7x a dot. Therefore I changed to:

        dot_time = analog_read;
        between_time = analog_read;
        dash_time = 3*analog_read;
        letter_time = 2*analog_read; 
        word_time = 2*analog_read;

and uncommented the "delay(word_time);"

  Are you sure? yes | no

fid wrote 08/30/2024 at 22:23 point

I’ve decided to put this into a mint tin and to include an on/off switch. I put the Nano onto a miniature breadboard so I can use the button on the tin box, or attach a straight key as the input device. 
I did notice on the wiring diagram that there is no 9v battery connection listed. That would be on the VIN and GND pins. 

Such a fun project. I can’t wait to play.

  Are you sure? yes | no

felix wrote 08/31/2024 at 08:24 point

Very nice! Yeah I forgot about the wiring of the Battery, I actually did it the same way and have an on/off switch aswell. 

Hope you have fun with the game!:)

  Are you sure? yes | no

trout-defile-dance wrote 08/30/2024 at 19:45 point

This is cool, thanks! Is there an STL file for the enclosure?

  Are you sure? yes | no

felix wrote 08/31/2024 at 08:20 point

Yes, I just added them to "Files"

  Are you sure? yes | no

fid wrote 08/28/2024 at 20:34 point

This looks like a fun adventure. I am thinking of using a straight key as the switch. That’ll get my practice in. 

I also like the LED instead of a speaker making noise.

Presently I am listening to a short story in Morse code to help me get quicker at decoding in my head.  An interactive game will be more fun. Thanks. 

  Are you sure? yes | no

felix wrote 08/28/2024 at 21:54 point

I really appreciate your comment, thanks! The switch I am using is cheap but also hurts the fingers if used too long, a straight key is certainly more comfortable.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates