Introduction: NameSmasher

Namesmasher- the smashing of 2 names!!!!!!

Step 1: Introduction

This project is very simple, now that I did it. Basically, what you have to do is connect a LCD and 2 buttons to the Arduino and then BAM you got a namesmasher. A namesmasher happens when you press a button and then one name blinks, same with the other. But when you press both simultaneously, both names will pop up until you let go.

Step 2: Materials:

All you need is:

6 male wires;

4 female wires;

2 resistors;

2 buttons;

an Arduino;

an LCD liquid crystal display;

and a breadboard.

Step 3: Setup

How to set up the LCD liquid crystal display;

As you can see in the picture you have to connect GND, VCC, SDA, and SCL to its corresponding point on the Arduino.

Step 4: Code

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1 , 0, 4, 5, 6, 7, 3, POSITIVE);

int votes[4]={0,0,0,0};

char inbyte;

String pwd="VOTE";

String inpt="";

boolean flag=false;

boolean securitygranted=false;

int i;

int buttonstate1 = 0; //setting buttonstates to 0

int buttonstate2 = 0;

int buttonstate3= 0;

int buttonstate4= 0;

void setup() {

pinMode(2, INPUT); //Inputs

pinMode(3, INPUT);

lcd.begin(16, 2);

lcd.display();

Serial.begin(9600);

Serial.println("ENTER PASSWORD");

}

void loop(){

lcd.setCursor(0,0);

buttonstate3= digitalRead(2); //reading the buttons

buttonstate4= digitalRead(3);

Serial.print(buttonstate3);

Serial.print(buttonstate4);

if (buttonstate3 == 1){ //if buttonstate is at 1

lcd.write("Gaya"); //Print this onto the LCD screen

delay(100); }

if (buttonstate4 == 1){ //if buttonstate is at 1

lcd.write("Jeremy"); //Print this onto the LCD screen

delay(100);

} if (buttonstate3 == 0){ //if buttonstate is at 0

lcd.clear(); //Clear the LCD screen

delay(100); }

if (buttonstate4 == 0){

lcd.clear(); delay(100);

}

}

Step 5: Conclusion

So after all this, I am here to say that you can make this project even cooler than what I did. You can add more buttons so you can print more names. You could make it be a voting system. Try adding two (etc.) LCDs and experiment with that. There are so many things that you could do with this idea.

Good luck and happy holidays!!

Arduino Contest 2017

Participated in the
Arduino Contest 2017