#include <LiquidCrystal.h>
#include <Wire.h>
#include "rgb_lcd.h"
rgb_lcd lcd;
int delaytime = 200;
int randomcolorsR = 0;
int randomcolorsG = 0;
int randomcolorsB = 0;
int randomNum1 = random(0, 19);
int randomNum2 = random(0, 19);
byte customChar[8] = {
0b01110,
0b10001,
0b11111,
0b11001,
0b11001,
0b11111,
0b10001,
0b01110
};
String msgs1[]= {"The killers","The victims","Their friends","The guards","The dead","The living","The funerals","Underworlds","Mourners", "Mortals","Demons","The potions","People","The evils","Nightmares","Hauntings","The survivors","Graveyards","Deaths","Phantoms"};
String msgs2[] = {"are back now...","are repulsive...","are gross...","are weird...","are evil...","had gore...","had saftey...","had no brains...","had no end...","began it...","awakened...","kill mortals...","created hell...","forbid help...","won't stop...","resists others...","didn't work...","started it...","rised...","started war..."};
//I need to replace these "msg1" and msgs 2 with more logical (and more through) matches!
// as of oct 17 this has been (i think) completed
void setup()
{
lcd.begin(16, 2);
randomSeed(analogRead(A0));
Serial.begin(9600);
lcd.createChar(0, customChar);
pinMode(4, INPUT); // set pin to input
digitalWrite(4, HIGH); // turn on pullup resistors
}
void loop()
{
if(digitalRead(4) == LOW)
{
lcd.clear();
randomcolorsR = random(0, 255);
randomcolorsG = random(0, 255);
randomcolorsB = random(0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
randomNum1 = random(0, 19);
randomNum2 = random(0, 19);
lcd.setCursor(0, 0);
lcd.print(msgs1[randomNum1]);
lcd.setCursor(0, 1);
lcd.print(msgs2[randomNum2]);
delay(3000);
lcd.clear();
lcd.clear();
randomcolorsR = random(0, 255);
randomcolorsG = random(0, 255);
randomcolorsB = random(0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
randomNum1 = random(0, 19);
randomNum2 = random(0, 19);
lcd.setCursor(0, 0);
lcd.print(msgs1[randomNum1]);
lcd.setCursor(0, 1);
lcd.print(msgs2[randomNum2]);
delay(3000);
lcd.clear();
lcd.clear();
randomcolorsR = random(0, 255);
randomcolorsG = random(0, 255);
randomcolorsB = random(0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
randomNum1 = random(0, 19);
randomNum2 = random(0, 19);
lcd.setCursor(0, 0);
lcd.print(msgs1[randomNum1]);
lcd.setCursor(0, 1);
lcd.print(msgs2[randomNum2]);
delay(3000);
lcd.clear();
lcd.clear();
randomcolorsR = random(0, 255);
randomcolorsG = random(0, 255);
randomcolorsB = random(0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
randomNum1 = random(0, 19);
randomNum2 = random(0, 19);
lcd.setCursor(0, 0);
lcd.print(msgs1[randomNum1]);
lcd.setCursor(0, 1);
lcd.print(msgs2[randomNum2]);
delay(3000);
lcd.clear();
randomcolorsR = (0, 255);
randomcolorsG = (0, 255);
randomcolorsB = (0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
lcd.setCursor(6, 0);
lcd.print("fin");
delay(900);
lcd.clear();
randomcolorsR = (0, 255);
randomcolorsG = (0, 255);
randomcolorsB = (0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
lcd.setCursor(1, 0);
lcd.write((uint8_t)0);
lcd.setCursor(3,0);
lcd.print("noah hellman");
lcd.setCursor(6,1);
lcd.print("2016");
delay(800);
}
else
{
noah();
}
}
void noah()
{
randomcolorsR = (0, 255);
randomcolorsG = (0, 255);
randomcolorsB = (0, 255);
lcd.setRGB(randomcolorsR, randomcolorsG, randomcolorsB);
lcd.setCursor(0, 0);
lcd.print("Press for a grim");
lcd.setCursor(2, 1);
lcd.print("4 line poem!");
}
Comments
Please log in or sign up to comment.