Project in progress
REEE Machine v2.0

REEE Machine v2.0

Why shout reeeeee for yourself when you can have a machine displaying that for you!?

  • 830 views
  • 1 comment
  • 1 respect

Components and supplies

Apps and online services

About this project

Press to REEEEEEE

might add sound in the future

Code

Reee machineArduino
// ree machine


#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

const int reeDelay = 50;

int n = 0;
int c = 1;
int state = 0;
int welcome = 0;
int button;


byte customChar[] = {     //bold E
  B11111,
  B11111,
  B11000,
  B11111,
  B11111,
  B11000,
  B11111,
  B11111
};

byte customChar2[] = {      //bold R
  B11110,
  B11011,
  B11011,
  B11110,
  B11100,
  B11110,
  B11011,
  B11001
};


void setup() {

  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.print("----------------");
  lcd.display();
  delay(500);
  lcd.clear();
  lcd.createChar(1, customChar);
  lcd.createChar(2, customChar2);
  lcd.home();
}

void loop() {
  button = analogRead(A0);
  Serial.print(button);
  Serial.print("\n");
  Serial.print(state);
  Serial.print("\n");
  
  if (button > 1020 && state == 0){
    lcd.clear();
    state = 1;
    welcome = 0;
    delay(1000);
  }
  else if (state == 1 && button <= 1020){
    Serial.print("elseif1   ");
    ree();
  }
  else if (state == 1 && button > 1020){
    Serial.print("elseif2");
    state = 0;
    n = 0;
    c = 1;
    lcd.clear();
    delay(1000);
  }
  else if (state == 0 && button <= 1020 && welcome == 0){
    Serial.print("elseif3");
    lcd.write("->PRESS TO REE<-");
    lcd.setCursor(0, 1);
    lcd.write("ree machine v2.0");
    welcome = 1;
  }
}




void ree() {
  Serial.print("ree on   ");
  
  if (n==0 && c==1){
    lcd.write(2);
    n= n + 1;
  }
  
  if (n < 16){
    lcd.write(1);
    n= n + 1;
  }
  
  else if (n == 16 && c == 1){
    c=2;
    n=0;
    lcd.setCursor(0,1);
  }
  
  else if (c==2 && n==16){
    delay(200);
    lcd.clear();
    c=1;
    n=0;
    delay(500);
  }
  
  delay(reeDelay);
}

Schematics

ree machine
just press the button
Ree machinejpg p8fquknw72

Comments

Similar projects you might like

Connect 4 Playing Machine

Project tutorial by markbennettuk

  • 1,803 views
  • 0 comments
  • 1 respect

The Drawing Machine

Project showcase by Kramick Saha

  • 18,504 views
  • 6 comments
  • 24 respects

Morse Code Machine

Project showcase by brzi

  • 5,533 views
  • 1 comment
  • 9 respects

Caravaggio, A Drawing Machine

Project showcase by Michele

  • 32,667 views
  • 11 comments
  • 173 respects

LED Color Sequencer

Project tutorial by Team thefantasticode.Group

  • 17,264 views
  • 17 comments
  • 43 respects

AI LCD friend!

Project tutorial by aip06

  • 10,385 views
  • 10 comments
  • 11 respects
Add projectSign up / Login