// The Raven - An object-oriented Arduino sketch
// Based on Edgar Allan Poe's poem
// File: Gray_TheRavenEAPoe.ino
// By: Gray Mack
// Created: 01/05/2026
// license selection-
// License I choose: https://mit-license.org/2022
// and specifically not this one: https://www.gnu.org/licenses/gpl-3.0.en.html
// note that mit license is permissive, credit only where as gpl is copyleft forcing derived work to be gpl
// Board: Uno R3
// Select Board: Uno
// Other Hardware: Button, LEDS, piezo element or micro speaker
// The Raven is published 1845, firmly in the public domain.
// Detailed description:
// Sometimes I like to code without a purpose.
// Just for the fun and relaxation
// There's some enums and simple object oriented class stuff included, else pretty straight forward.
// Enjoy this code poetry
// Rev History:
// 01/05/2026 initial code creation
// ----[ configuration ]------------------------------------
const long SerialBaud = 115200; // set your monitors baud to this value
// ----[ included libraries ]------------------------------------
// none
// ----[ pin definitions ]------------------------------------
const int PinNextStanzaButton = 2;
const int PinConfirmLed = 3;
const int PinPoeLed = 4;
const int PinRavenLed = 5;
const int PinSpeaker = 13;
// ----[ constants ]------------------------------------
// locations/objects
enum LocationObject {
Unspecified,
Outside_UpperWestSideNewYork, // Poe lived in Brennan Farmhouse @ 84th & Broadway
InsideChamber, // it's coming from inside the house! Pretty nice 2 story house on a hill
ChamberDoor,
TheBird,
ChamberFloor,
ChamberWindow,
BookcaseOfBooks, // Companies like Harper & Brothers were printing millions of books back in 1844
PurpleCurtain, // snazzy drapes!
BustOfPallasAboveChamberDoor, // Roman Pallas Athena Giustiniani. Not sure why you want that over your door, might fall on someone, but ok.
Lamp, // 1844 so it was probably an oil or candle lamp
Telephone, // just kidding, that was 1860s, but the telegraph was invented around that time
StinkyChair, // a WheeledVelvetCushionedSeat, I wonder if it matches the drapes?
Gilead, // In the Bible, Gilead refers to a fertile, mountainous region east of the Jordan River
PlutonianShore, // underworld realm of the Roman god Pluto
TheAfterlife // hopefully a little nicer digs than the Plutonian shore
};
enum Phrase {
Nevermore,
BelovedsName,
WhoThat,
WhoIsIt,
LeaveMeAlone,
PollyWantACracker,
JokeWithRaven,
ThatsAllYouGot,
YouAreGonnaLeaveMeToo,
YouStupidBird,
Wretch,
Respite,
Quaff,
Prophet,
TellMe,
Desolate,
IsThereBugBomb,
IsMyMaidenWithTheAngels,
GoOnGit,
AndStopPoopingInHere,
GetOut,
PHRASE_COUNT
};
// Array of phrase strings MUST MATCH the Phrase enum
const char phrase00[] PROGMEM = /*Nevermore*/ "Nevermore.";
const char phrase01[] PROGMEM = /*BelovedsName*/ "Lenore.";
const char phrase02[] PROGMEM = /*WhoThat*/ "'Tis some visitor, tapping at my chamber door-";
const char phrase03[] PROGMEM = /*WhoIsIt*/ "some visitor entreating entrance at my chamber door-";
const char phrase04[] PROGMEM = /*LeaveMeAlone*/ "Sir or Madam, I implore. I was napping, why dafudge you rapping? at my door!";
const char phrase05[] PROGMEM = /*PolyWantACracker*/ "Are ya hungry? (presenting crackers)";
const char phrase06[] PROGMEM = /*JokeWithRaven*/ "I mean, Though thy crest be shorn and shaven, thou, art sure no craven, hahahha, but you probably heard that one before.";
const char phrase07[] PROGMEM = /*ThatsAllYouGot*/ "So that's all you got. Just gonna sit there and say Nevermore and crap on the floor?";
const char phrase08[] PROGMEM = /*YouAreGonnaLeaveMeToo*/ "On the morrow he will leave me, as my hopes have flown before.";
const char phrase09[] PROGMEM = /*YouStupidBird*/ "Doubtless, what it utters is its only stock and store,";
const char phrase10[] PROGMEM = /*Wretch*/ "Wretch, thy God hath lent thee-by these angels he hath sent thee";
const char phrase11[] PROGMEM = /*Respite*/ "Respite-respite and nepenthe, from thy memories of Lenore";
const char phrase12[] PROGMEM = /*Quaff*/ "Quaff, oh cough, cough, this kind nepenthe and forget this lost Lenore!";
const char phrase13[] PROGMEM = /*Prophet*/ "Prophet! thing of evil!-prophet still, if bird or devil!";
const char phrase14[] PROGMEM = /*TellMe*/ "tell me, I implore-";
const char phrase15[] PROGMEM = /*Desolate*/ "Why you desolate my decor?";
const char phrase16[] PROGMEM = /*IsThereBugBomb*/ "Is there bug bomb in Gilead?"; // Gilead some place from the bible where you get stuff like healing balm or maybe bug bomb
// I kind of made this part up
const char phrase17[] PROGMEM = /*IsMyMaidenWithTheAngels*/ "within the distant Aidenn (Eden/afterlife), will I ever again meet my maiden.";
const char phrase18[] PROGMEM = /*GoOnGit*/ "Get thee back into the tempest and the Night's Plutonian shore!";
const char phrase19[] PROGMEM = /*AndStopPoopingInHere*/ "Leave no black plume as a token on my floor!";
const char phrase20[] PROGMEM = /*GetOut*/ "Just get on out my chamber door!";
const char* const PhraseString[PHRASE_COUNT] PROGMEM = {
phrase00, phrase01, phrase02, phrase03, phrase04,
phrase05, phrase06, phrase07, phrase08, phrase09,
phrase10, phrase11, phrase12, phrase13, phrase14,
phrase15, phrase16, phrase17, phrase18, phrase19,
phrase20
};
// Helper function to get PROGMEM string
const __FlashStringHelper* GetPhraseString(Phrase phrase) {
return (const __FlashStringHelper*)pgm_read_ptr(&PhraseString[phrase]);
}
// ----[ predeclarations ]------------------------------------
// ----[ helper classes ]-------------------------------------------
// Base class for all beings =============================
class Being {
protected:
String name;
bool isLiving;
LocationObject location;
public:
Being(String who, bool living, LocationObject loc) : name(who), isLiving(living), location(loc) {}
virtual ~Being() {}
String getName() const { return name; }
void setName(String n) { name = n; };
bool getIsLiving() const { return isLiving; }
LocationObject getLocation() const { return location; }
void setLocation(LocationObject loc) { location = loc; }
virtual void Speak(Phrase phrase, bool query = false) {
Serial.print(name);
Serial.print(": ");
Serial.println(GetPhraseString(phrase));
delay(1000);
}
inline void Ask(Phrase phrase) { Speak(phrase, true); }
void Ponder(String how, String thought, bool silentPonder = true) {
digitalWrite(PinRavenLed, LOW);
digitalWrite(PinPoeLed, HIGH);
if(!silentPonder) Serial.print(F(" while I ponder, "));
Serial.print(how); Serial.print(", ");
Serial.println(thought);
delay(100);
}
};
// Human class ======================================
class Human : public Being {
protected:
float despairPercent;
float fearPercent;
public:
Human(String n, bool living, LocationObject loc, float despair = 0.0, float fear = 0.0)
: Being(n, living, loc), despairPercent(despair), fearPercent(fear) {}
void setDespair(float despair) {
despairPercent = constrain(despair, 0.0, 100.0);
if(despairPercent < 10.0) Serial.println(F("(Poe smiles)"));
else if(despairPercent > 89.0) Serial.println(F("(Despair intensifies)"));
}
void setFear(float fear) {
float fearChange = fear - fearPercent;
fearPercent = constrain(fear, 0.0, 100.0);
if(fearChange < 0.0) Serial.println(F("(Poe relaxes)"));
else Serial.println(F("(Fear intensifies)"));
}
float getDespair() const { return despairPercent; }
float getFear() const { return fearPercent; }
void Speak(Phrase phrase, bool query=false) override {
digitalWrite(PinRavenLed, LOW);
digitalWrite(PinPoeLed, HIGH);
Serial.print(name);
if(query)
Serial.print(" asks: ");
else
Serial.print(" speaks: ");
Serial.println(GetPhraseString(phrase));
delay(500);
}
};
// Bird class ======================================
class Bird : public Being {
protected:
String birdType;
public:
Bird(String n, bool living, LocationObject loc, String type = "Unknown")
: Being(n, living, loc), birdType(type) {}
String getBirdType() const { return birdType; }
void Speak(Phrase phrase, bool query = false) override {
digitalWrite(PinPoeLed, LOW);
digitalWrite(PinRavenLed, HIGH);
Serial.print(birdType);
Serial.print(": ");
Serial.println(GetPhraseString(phrase));
}
void Tap(String how, LocationObject loc) {
Serial.print(how);
Serial.print(F(" tapping "));
digitalWrite(PinPoeLed, LOW);
for(int i=0; i< 3; i++) {
digitalWrite(PinRavenLed, HIGH);
tone(PinSpeaker, 500, 30);
delay(200);
digitalWrite(PinRavenLed, LOW);
delay(200);
}
switch(loc) {
case PlutonianShore:
Serial.println(F("at the Plutonian shore"));
break;
case ChamberDoor:
Serial.println(F("As of some one gently rapping, rapping at my chamber door."));
break;
case ChamberWindow:
Serial.println(F("at my window lattice"));
break;
case BustOfPallasAboveChamberDoor:
Serial.println(F("at the bust of Pallas above my chamber door"));
break;
case ChamberFloor:
Serial.println(F("on my chamber floor"));
break;
case Lamp:
Serial.println(F("against the lamp"));
break;
case Gilead:
Serial.println(F("over in Gilead"));
break;
case TheAfterlife:
Serial.println(F("knock, knock, knocking on heaven's door"));
break;
default:
break;
}
location = loc; // Update bird's location
}
};
// ----[ global variables ]------------------------------------
Human* EdgarAllanPoe = nullptr;
Human* Lenore = nullptr;
Bird* Raven = nullptr;
int LedState = LOW;
// ----[ code ]------------------------------------
void setup() {
pinMode(PinNextStanzaButton, INPUT_PULLUP);
pinMode(PinConfirmLed, OUTPUT);
pinMode(PinPoeLed, OUTPUT);
pinMode(PinRavenLed, OUTPUT);
pinMode(PinSpeaker, OUTPUT);
Serial.begin(SerialBaud);
delay(1000);
Serial.println("=== The Raven (sort of) ===");
Serial.println();
EdgarAllanPoe = new Human("Poe", true, ChamberFloor, 60.0, 10.0); // Our Protagonist, Living, on chamber floor, with despair and fear
Lenore = new Human("Lenore", false, TheAfterlife, 0.0, 0.0); // His beloved wife, Deceased
Raven = new Bird("The Raven", true, Outside_UpperWestSideNewYork, "Raven"); //
//1
//Once upon a midnight dreary, while I pondered, weak and weary,
//Over many a quaint and curious volume of forgotten lore,
//While I nodded, nearly napping, suddenly there came a tapping,
//As of some one gently rapping, rapping at my chamber door. “
//“'Tis some visitor,” I muttered, “tapping at my chamber door—
//Only this, and nothing more.”
BeginScene();
Examine(BookcaseOfBooks);
Raven->Tap("suddenly there came", ChamberDoor);
EdgarAllanPoe->Ask(WhoThat);
TheNothingness(1);
//2
//Ah, distinctly I remember it was in the bleak December,
//And each separate dying ember wrought its ghost upon the floor.
//Eagerly I wished the morrow;—vainly I had sought to borrow
//From my books surcease of sorrow—sorrow for the lost Lenore—
//For the rare and radiant maiden whom the angels name Lenore—
//Nameless here for evermore.
EdgarAllanPoe->Ponder("distinctly I remember", "it was in the bleak December");
EdgarAllanPoe->Ponder("with sorrow for", "the lost Lenore");
EdgarAllanPoe->Ponder("with sorrow", "For the rare and radient maiden whom the angels name Lenore");
Lenore->setName(""); // perhaps I won't user her name anymore. Nameless here for evermore.
TheNothingness(2);
//3
//And the silken sad uncertain rustling of each purple curtain
//Thrilled me—filled me with fantastic terrors never felt before;
//So that now, to still the beating of my heart, I stood repeating,
//“'Tis some visitor entreating entrance at my chamber door—
//Some late visitor entreating entrance at my chamber door;—
//This it is, and nothing more.”
Examine(PurpleCurtain);
EdgarAllanPoe->setFear(EdgarAllanPoe->getFear()+50.0);
Serial.println(F("Zoiks!"));
EdgarAllanPoe->Ask(WhoIsIt);
Serial.println(F("(repeating)"));
EdgarAllanPoe->Ask(WhoIsIt);
TheNothingness(3);
//4
//Presently my soul grew stronger; hesitating then no longer,
//“Sir,” said I, “or Madam, truly your forgiveness I implore;
//But the fact is I was napping, and so gently you came rapping,
//And so faintly you came tapping, tapping at my chamber door,
//That I scarce was sure I heard you”—here I opened wide the door;—
//Darkness there, and nothing more.
EdgarAllanPoe->Speak(LeaveMeAlone);
Raven->Tap("so gently", ChamberDoor);
Open(ChamberDoor);
TheNothingness(4);
//5
//Deep into that darkness peering, long I stood there wondering, fearing,
//Doubting, dreaming dreams no mortals ever dared to dream before;
//But the silence was unbroken, and the stillness gave no token,
//And the only word there spoken was the whispered word, “Lenore!”
//This I whispered, and an echo murmured back the word, “Lenore!”—
//Merely this, and nothing more.
Examine(Outside_UpperWestSideNewYork);
EdgarAllanPoe->setFear(EdgarAllanPoe->getFear()+8.0);
EdgarAllanPoe->Ask(BelovedsName);
Raven->Speak(BelovedsName);
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()+12.5);
TheNothingness(5);
//6
//Back into the chamber turning, all my soul within me burning,
//Soon again I heard a tapping somewhat louder than before.
//“Surely,” said I, “surely that is something at my window lattice,
//Let me see, then, what thereat is, and this mystery explore—
//Let my heart be still a moment and this mystery explore;—
//'Tis the wind and nothing more.”
Raven->Tap("Somewhat louder", ChamberWindow);
Serial.println(F("Whats this, ring-and-run? You meddeling kids! I'll call your mom!"));
EdgarAllanPoe->Ponder("Let me see, what threat is", "and this mystery explore-");
EdgarAllanPoe->Ponder("with still heart", "and this mystery explore;-");
TheNothingness(6);
//7
//Open here I flung the shutter, when, with many a flirt and flutter,
//In there stepped a stately raven of the saintly days of yore.
//Not the least obeisance made he; not a minute stopped or stayed he;
//But, with mien of lord or lady, perched above my chamber door—
//Perched upon a bust of Pallas just above my chamber door—
//Perched, and sat, and nothing more.
Open(ChamberWindow);
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()+6.7);
Raven->setLocation(InsideChamber);
delay(10);
Raven->setLocation(BustOfPallasAboveChamberDoor);
TheNothingness(7);
//8
//Then this ebony bird beguiling my sad fancy into smiling,
//By the grave and stern decorum of the countenance it wore.
//“Though thy crest be shorn and shaven, thou,” I said, “art sure no craven,
//Ghastly grim and ancient raven wandering from the Nightly shore—
//Tell me what thy lordly name is on the Night's Plutonian shore!”
//Quoth the Raven, “Nevermore.”
Examine(TheBird);
EdgarAllanPoe->setDespair(0.2); // This is too weird to despair, maybe I can keep the raven as a pet.
EdgarAllanPoe->Ask(PollyWantACracker);
EdgarAllanPoe->Speak(JokeWithRaven);
TheNothingness(8);
//9
//Much I marvelled this ungainly fowl to hear discourse so plainly,
//Though its answer little meaning—little relevancy bore;
//For we cannot help agreeing that no living human being
//Ever yet was blest with seeing bird above his chamber door—
//Bird or beast upon the sculptured bust above his chamber door,
//With such name as “Nevermore.”
Serial.println(F("This must be like a sign or something, this raven above my door"));
Serial.println(F("I'm so blessed, a bird on my bust. Hope he don't crap on the floor"));
TheNothingness(9);
//10
//But the Raven, sitting lonely on the placid bust, spoke only
//That one word, as if his soul in that one word he did outpour.
//Nothing further then he uttered—not a feather then he fluttered—
//Till I scarcely more than muttered, “other friends have flown before—
//On the morrow he will leave me, as my hopes have flown before.”
//Then the bird said, “Nevermore.”
Serial.println(F("Nothing further then he uttered—not a feather then he fluttered-(raven poops)"));
tone(PinSpeaker, 100, 30);
EdgarAllanPoe->Ask(ThatsAllYouGot);
EdgarAllanPoe->Speak(YouAreGonnaLeaveMeToo);
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()+9.8);
TheNothingness(10);
//11
//Startled at the stillness broken by reply so aptly spoken,
//“Doubtless,” said I, “what it utters is its only stock and store,
//Caught from some unhappy master whom unmerciful Disaster
//Followed fast and followed faster till his songs one burden bore—
//Till the dirges of his Hope that melancholy burden bore,
//Of ‘Never—nevermore’.”
EdgarAllanPoe->Speak(YouStupidBird);
EdgarAllanPoe->setFear(EdgarAllanPoe->getFear()-22.3);
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()+9.8);
TheNothingness(11);
//12
//But the Raven still beguiling my sad fancy into smiling,
//Straight I wheeled a cushioned seat in front of bird and bust and door;
//Then, upon the velvet sinking, I betook myself to linking
//Fancy unto fancy, thinking what this ominous bird of yore—
//What this grim, ungainly, ghastly, gaunt, and ominous bird of yore
//Meant in croaking “Nevermore.”
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()-9.8);
Examine(StinkyChair);
Action(StinkyChair);
TheNothingness(12);
//13
//This I sat engaged in guessing, but no syllable expressing
//To the fowl whose fiery eyes now burned into my bosom's core;
//This and more I sat divining, with my head at ease reclining
//On the cushion's velvet lining that the lamplight gloated o'er,
//But whose velvet violet lining with the lamplight gloating o'er,
//She shall press, ah, nevermore!
Serial.println(F("To the fowl whose fiery eyes now burned into my bosom's core;"));
Serial.println(F("He then pooped, a little more..."));
tone(PinSpeaker, 100, 30);
EdgarAllanPoe->Ponder("guessing, but no syllable expressing", "What? I mean really! Just why?");
TheNothingness(13);
//14
//Then, methought, the air grew denser, perfumed from an unseen censer
//Swung by Seraphim whose footfalls tinkled on the tufted floor.
//“Wretch,” I cried, “thy God hath lent thee—by these angels he hath sent thee
//Respite—respite and nepenthe, from thy memories of Lenore;
//Quaff, oh quaff this kind nepenthe and forget this lost Lenore!”
//Quoth the Raven, “Nevermore.”
EdgarAllanPoe->Ponder("me thought", "Dude, what's that smell?");
Serial.println(F("(air density intensifies) perfumed from an unseen censor (silent but violent)"));
EdgarAllanPoe->Speak(Wretch);
EdgarAllanPoe->Speak(Respite);
EdgarAllanPoe->Speak(Quaff);
TheNothingness(14);
//15
//“Prophet!” said I, “thing of evil!—prophet still, if bird or devil!—
//Whether Tempter sent, or whether tempest tossed thee here ashore,
//Desolate yet all undaunted, on this desert land enchanted—
//On this home by horror haunted—tell me truly, I implore—
//Is there—is there balm in Gilead?—tell me—tell me, I implore!”
//Quoth the Raven, “Nevermore.”
EdgarAllanPoe->Ask(Prophet);
EdgarAllanPoe->Speak(Desolate);
EdgarAllanPoe->Speak(TellMe);
EdgarAllanPoe->Ask(IsThereBugBomb);
EdgarAllanPoe->Speak(TellMe);
TheNothingness(15);
//16
//“Prophet!” said I, “thing of evil!—prophet still, if bird or devil!
//By that Heaven that bends above us—by that God we both adore—
//Tell this soul with sorrow laden if, within the distant Aidenn,
//It shall clasp a sainted maiden whom the angels name Lenore—
//Clasp a rare and radiant maiden whom the angels name Lenore.”
//Quoth the Raven, “Nevermore.”
EdgarAllanPoe->Ask(Prophet); // he repeats this
EdgarAllanPoe->Ask(IsMyMaidenWithTheAngels);
TheNothingness(16);
//17
//“Be that word our sign in parting, bird or fiend!” I shrieked, upstarting—
//“Get thee back into the tempest and the Night's Plutonian shore!
//Leave no black plume as a token of that lie thy soul hath spoken!
//Leave my loneliness unbroken!—quit the bust above my door!
//Take thy beak from out my heart, and take thy form from off my door!”
//Quoth the Raven, “Nevermore.”
EdgarAllanPoe->setDespair(EdgarAllanPoe->getDespair()+26.3);
EdgarAllanPoe->Speak(GoOnGit);
EdgarAllanPoe->Speak(AndStopPoopingInHere);
EdgarAllanPoe->Speak(GetOut);
TheNothingness(17);
//18
//And the Raven, never flitting, still is sitting, still is sitting
//On the pallid bust of Pallas just above my chamber door;
//And his eyes have all the seeming of a demon's that is dreaming,
//And the lamplight o'er him streaming throws his shadow on the floor;
//And my soul from out that shadow that lies floating on the floor
//Shall be lifted—nevermore!
Serial.println(F("Remember kids- If you feed him, he will never leave."));
TheNothingness(18);
EdgarAllanPoe->setDespair(99.0);
EdgarAllanPoe->setFear(67.0);
delay(2000);
}
void loop() {
if(digitalRead(PinNextStanzaButton) == LOW) {
Serial.println(F("End of line. (Reset button to restart)"));
delay(100);
}
}
// last update: A bleak day in December 1844, around midnight
// Notes: so dreary, I wished it was tomorrow already
void BeginScene() {
Serial.println(F("Once upon a midnight dreary,"));
EdgarAllanPoe->Ponder("weak and weary (too much corn whiskey)", "volumes of forgotten lore (readin books)", false);
}
void StillSilence() {
delay(3000);
Serial.print(F("But the silence was unbroken, "));
Serial.println(F("and the stillness gave no token,"));
}
void Examine(LocationObject what) {
static bool birdFirstLook = true;
switch(what) {
case BookcaseOfBooks:
Serial.println(F("So many dusty books... You nod, nearly napping"));
break;
case PurpleCurtain:
Serial.println(F("You examine the purple curtain. It's all like silken, sad, and uncertain. Honestly, you hate this curtain but you can't bear to throw it out."));
break;
case ChamberWindow:
Serial.println(F("Surely, surely that is something at my window lattice,"));
break;
case Outside_UpperWestSideNewYork:
Serial.println(F("You stand by the door and peer out. It's dark and gloomy out there. You quickly turn back into the chamber"));
break;
case ChamberDoor:
Serial.println(F("Darkness there, and nothing more."));
break;
case TheBird:
if(birdFirstLook)
{
Serial.println(F("Then this ebony bird beguiling my sad fancy into smiling"));
birdFirstLook= false;
}
else
{
Serial.println(F("the Raven, never flitting, still is sitting"));
Serial.println(F("On the pallid bust of Pallas just above my chamber door;"));
Serial.println(F("his eyes have all the seeming of a demon's that is dreaming,"));
Serial.println(F("the lamplight o'er him streaming throws his shadow on the floor"));
}
break;
case StinkyChair:
Serial.println(F("This wheeled velvet cushioned seat is very old. Also kind of stinky,"));
Serial.println(F("Your wife always hated it but it's super comfy. Also it matches the purple curtains."));
Serial.println(F("I think it's still perfectly fine, no need to replace it."));
break;
default:
break;
}
delay(500);
}
void Open(LocationObject what) {
switch(what) {
case ChamberDoor:
Serial.println(F("here I opened wide the door-"));
break;
case ChamberWindow:
Serial.println(F("You open the window, it's damp and chilly now :("));
delay(700);
Serial.println(F("Awh, crap! a bird just flew in. Well that's just great!"));
break;
case Lamp:
Serial.println(F("You open the lamp and light it, then close the lamp back, good job-"));
break;
default:
Serial.println(F("You can't seem to open it-"));
break;
}
}
void Action(LocationObject what) {
switch(what) {
case ChamberDoor:
Serial.println("here I opened wide the door");
break;
case StinkyChair:
Serial.println(F("Straight I wheeled a cushioned seat in front of bird and bust and door;"));
Serial.println(F("Then, upon the velvet stinking (very old chair), I betook myself to linking (You sit)"));
break;
default:
Serial.println(F("You try, but nothing happens"));
break;
}
delay(2000);
}
// Just a bunch of negativity. :(
void TheNothingness(int paragraph) {
bool ravenSpeak = false;
switch(paragraph)
{
case 1:
Serial.println(F("This it is, and nothing more."));
Serial.println(F(" (press button for next stanza)"));
break;
case 2:
Serial.println(F("Nameless here for evermore."));
break;
case 3:
Serial.println(F("This it is, and nothing more."));
break;
case 4:
Serial.println(F("Darkness there, and nothing more."));
break;
case 5:
Serial.println(F("Merely this, and nothing more."));
break;
case 6:
Serial.println(F("Nuttin' Honey, 'Tis like the wind or something"));
break;
case 7:
Serial.println(F("Dude, how am I gonna get this bird out!"));
break;
case 8: case 9: case 10: case 11: case 12: case 13:
ravenSpeak = true;
Serial.println(F("Raven: Knock, Knock....Nevermore!"));
break;
case 14: case 15: case 16: case 17:
ravenSpeak = true;
Serial.println(F("Raven: Cough! Nevermore!"));
break;
case 18:
Serial.println(F("Shall be lifted-Nevermore!"));
break;
default:
break;
}
Serial.println();
if(ravenSpeak) {
digitalWrite(PinPoeLed, LOW);
digitalWrite(PinRavenLed, HIGH);
}
while(digitalRead(PinNextStanzaButton) == HIGH) delay(1);
LedState = ! LedState;
digitalWrite(PinConfirmLed, LedState);
delay(100);
while(digitalRead(PinNextStanzaButton) == LOW) delay(1);
}