Things used in this project

Schematics

EVM circuit diagram

Code

EVM codeC/C++
It is the code for EVM.
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int sw1=10;
int sw2=8;
int sw3=9;
int sw4=13;
int sw5=6;
int a=0;
int b=0;
int c=0;
void setup() {
  // put your setup code here, to run once:
  pinMode(sw1,INPUT);
  pinMode(sw2,INPUT);
  pinMode(sw3,INPUT);
  pinMode(sw4,INPUT);
  pinMode(sw5,INPUT);
  
lcd.begin(16,2);
lcd.setCursor(4,0);
lcd.print("ELECTRONIC");
lcd.setCursor(0,1);
lcd.print("VOTING");
lcd.setCursor(8,1);
lcd.print("MACHINE");
delay(3000);
lcd.clear();

digitalWrite(sw1,HIGH);
digitalWrite(sw2,HIGH);
digitalWrite(sw3,HIGH);
digitalWrite(sw4,HIGH);
digitalWrite(sw5,HIGH);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("BJP");
lcd.setCursor(6,0);
lcd.print("AAP");
lcd.setCursor(12,0);
lcd.print("CONG");
lcd.setCursor(0,1);
lcd.print("SW1");
lcd.setCursor(6,1);
lcd.print("SW2");
lcd.setCursor(12,1);
lcd.print("SW3");

delay(1000);



}

void loop() {
  
  // put your main code here, to run repeatedly:



if(digitalRead(sw1)==LOW)
{
  a=a+1;
  lcd.clear();
  lcd.setCursor(0,0);
 lcd.print("THANKS FOR");
 lcd.setCursor(5,1);
 lcd.print("VOTING");
 while(digitalRead(sw4)== HIGH);
admin();
     
}
 else if(digitalRead(sw2)== LOW)
{b=b+1;
lcd.clear();
  lcd.setCursor(0,0);
 lcd.print("THANKS FOR");
 lcd.setCursor(5,1);
 lcd.print("VOTING");
while(digitalRead(sw4)==HIGH);
admin();
}
 else if(digitalRead(sw3)== LOW)
{c=c+1;
lcd.clear();
  lcd.setCursor(0,0);
 lcd.print("THANKS FOR");
 lcd.setCursor(5,1);
 lcd.print("VOTING");
while(digitalRead(sw4)==HIGH);
admin();
}
 
 if(digitalRead(sw5)== LOW)
{
  lcd.begin(16,2);z
lcd.setCursor(0,0);
lcd.print("BJP");
lcd.setCursor(6,0);
lcd.print("AAP");
lcd.setCursor(12,0);
lcd.print("CONG");
lcd.setCursor(0,1);
lcd.println(a);
lcd.setCursor(6,1);
lcd.println(b);
lcd.setCursor(12,1);
lcd.println(c);
delay(2000);
lcd.clear();
  int d=a+b+c;
  if(d)
  { if(a>b && a>c )
  {
   lcd.setCursor(0,0);
   lcd.print("CONGRATS");
   lcd.setCursor(5,1);
   lcd.print("BJP WINS");
   delay(2000);
   lcd.clear();
  }
else if(b>a && b>c )
 {
   lcd.setCursor(0,0);
   lcd.print("CONGRATS");
   lcd.setCursor(5,1);
   lcd.print("AAP WINS");
   delay(2000);
   lcd.clear();
 }
 else if(c>b && c>a )
 {
   lcd.setCursor(0,0);
   lcd.print("CONGRATS");
   lcd.setCursor(5,1);
   lcd.print("CONG WINS");
   delay(2000);
   lcd.clear();
 }
 else
 {
  lcd.setCursor(0,0);
  lcd.print("NO RESULT");
  lcd.setCursor(0,1);
  lcd.print("OR TIE");
  
  delay(2000);
   lcd.clear();
 
 }
  }
 else
 {
  lcd.print("NO VOTE");
  delay(2000);
  lcd.clear();
 }
 
  
  
}


}
int admin()
{if(digitalRead(sw4)== LOW)
{lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("BJP");
lcd.setCursor(6,0);
lcd.print("AAP");
lcd.setCursor(12,0);
lcd.print("CONG");
lcd.setCursor(0,1);
lcd.print("SW1");
lcd.setCursor(6,1);
lcd.print("SW2");
lcd.setCursor(12,1);
lcd.print("SW3");

delay(1000);

}
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

PHPoC: Web-Based Thermometer
Easy
  • 290
  • 13

Full instructions

This project allows you to check the temperature at home from anywhere using a web browser.

Arduino controlled Wall-E head
Easy
  • 5
  • 1

Full instructions

In this project I'll show you how to control a Servo remotely from a regular web page without the need of a web server in your arduino board

Sorting Hat: Circuit Playground Express Starter Project
Easy
  • 158
  • 3

Protip

Which Hogwarts House do you belong in? A quick first project for this beginner-friendly board from Adafruit.

NeoPixel Thermometer!
Easy
  • 354
  • 5

Full instructions

Transforms a NeoPixel ring into a cool thermometer

MyHumidity Controlled by BME280 and Photon
Easy
  • 174
  • 3

Full instructions

Checks if humidity threshold is reached and informs the user by using Blynk/IFTTT-services with softAP integration.

ioTank-101
Easy
  • 101
  • 2

Full instructions

Affordable light quality/indoor environment shield. BLE support. Arduino-101. Designed for the 2017 Co-Making the Future competition.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login