#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int button = 6;
int switchState = 0;
int reply;
void setup() {
lcd.begin(16, 2);
pinMode(button, INPUT);
lcd.print("The MAGIC!");
lcd.setCursor(0, 1);
lcd.print("CONCHHHH!!");
}
void loop() {
switchState = digitalRead(button);
if(switchState == HIGH)
{
reply = random(6);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Conch says...");
lcd.setCursor(0, 1);
switch(reply)
{
case 0:
lcd.print("Maybe");
break;
case 1:
lcd.print("Nothing");
break;
case 2:
lcd.print("Neither");
break;
case 3:
lcd.print("I dont think so");
break;
case 4:
lcd.print("No");
break;
case 5:
lcd.print("yes");
break;
}
}
}