Hardware Reference
In-Depth Information
> GO NORTH
You are under an apple tree. It provides comfortable shade from the sun,
and the ground looks comfortable, more than enough for a quick snooze.
There is an apple in the tree.
As easy as it was to move around, the text system did have its limits. It wasn't
possible to create sentences that were too complicated...
> IS THERE A WORM IN THE APPLE?
I'm sorry, I don't understand you. Please be more specific.
> I WANT TO KNOW IF THE APPLE IS EDIBLE
I'm sorry, I don't understand you. Try rephrasing that.
> IS THE APPLE RIPE?
I'm sorry, I don't understand you. Please be more specific.
> TAKE APPLE
You take the apple.
Early versions of the game actually saved time and size by analyzing the
i rst i ve letters of any instruction; by using this method, the game could run
on almost any computer. Later, as systems became faster, fans of the game
developed versions in which each individual word was analyzed, and more
complex orders could be given.
> HIT THE TROLL WITH THE SILVER SWORD
Well, he didn't see that one coming! The troll curls up into a ball, and
turns back into rock.
More devious programmers had fun making games, turning some situations
into textual nightmares:
> PUT THE RED GEM INTO THE BLUE SOCK AND PUT IT UNDER THE ALTAR
A voice echoes; Naribi accepts your gift! You hear a click from the other
side of the door, and it slowly swings open.
Because the Arduino Due can accept a USB keyboard, it makes a perfect setup
for some old-school games. You won't be designing an entire game; instead,
these routines will concentrate on text input.
Remember, waiting for USB events can block the system for up to 5 seconds,
so these routines will not be called all the time. They will be called only when
the Arduino expects input and will continue to run until the last character is
entered: the Enter key. After the text is entered, the Arduino can scan the indi-
vidual words and then act according to some rules.
Hardware
This application runs on an Arduino Due because of the USB Host possibilities
provided by this platform.
 
Search WWH ::




Custom Search