Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Digital Voting Machine
Just Do Electronics
May 01, 2020
Smart Electronic Voting Machine
Circuit Diagram :-
Code :-
//Pratee //www.prateeks.in #include
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); #define S1 7 #define S2 6 #define S3 5 #define S4 4 #define S5 3 int vote1=0; int vote2=0; int vote3=0; int vote4=0; void setup() { pinMode(S1, INPUT); pinMode(S2,INPUT); pinMode(S3,INPUT); pinMode(S4,INPUT); pinMode(S5,INPUT); lcd.begin(16, 2); lcd.print(" Electronic "); lcd.setCursor(0,1); lcd.print(" Voting Machine "); delay(4000); digitalWrite(S1, HIGH); digitalWrite(S2, HIGH); digitalWrite(S3, HIGH); digitalWrite(S4, HIGH); digitalWrite(S5, HIGH); lcd.clear(); lcd.setCursor(1,0); lcd.print("B"); lcd.setCursor(5,0); lcd.print("C"); lcd.setCursor(9,0); lcd.print("A"); lcd.setCursor(13,0); lcd.print("N"); } void loop() { lcd.setCursor(1,0); lcd.print("B"); lcd.setCursor(1,1); lcd.print(vote1); lcd.setCursor(5,0); lcd.print("C"); lcd.setCursor(5,1); lcd.print(vote2); lcd.setCursor(9,0); lcd.print("A"); lcd.setCursor(9,1); lcd.print(vote3); lcd.setCursor(13,0); lcd.print("N"); lcd.setCursor(13,1); lcd.print(vote4); if(digitalRead(S1)==0) vote1++; while(digitalRead(S1)==0); if(digitalRead(S2)==0) vote2++; while(digitalRead(S2)==0); if(digitalRead(S3)==0) vote3++; while(digitalRead(S3)==0); if(digitalRead(S4)==0) vote4++; while(digitalRead(S4)==0); if(digitalRead(S5)==0) { int vote=vote1+vote2+vote3+vote4; if(vote) { if((vote1 > vote2 && vote1 > vote3 && vote1 > vote4)) { lcd.clear(); lcd.print("B is Winner"); delay(3000); lcd.clear(); } else if((vote2 > vote1 && vote2 > vote3 && vote2 > vote4)) { lcd.clear(); lcd.print("C is Winner"); delay(3000); lcd.clear(); } else if((vote3 > vote1 && vote3 > vote2 && vote3 > vote4)) { lcd.clear(); lcd.print("A is Winner"); delay(3000); lcd.clear(); } else if(vote4 > vote1 && vote4 > vote2 && vote4 > vote3) { lcd.setCursor(0,0); lcd.clear(); lcd.print("N is Winner"); delay(3000); lcd.clear(); } else if(vote4 > vote1 && vote4 > vote2 && vote4 > vote3) { lcd.setCursor(0,0); lcd.clear(); lcd.print("N is Winner"); delay(3000); lcd.clear(); } else { lcd.clear(); lcd.print(" Tie Up Or "); lcd.setCursor(0,1); lcd.print(" No Result "); delay(3000); lcd.clear(); } } else { lcd.clear(); lcd.print("No Voting...."); delay(3000); lcd.clear(); } vote1=0;vote2=0;vote3=0;vote4=0,vote=0; lcd.clear(); } }
Photo
0 Comments
Newer
Older
Build Your Own Gps Tracking System using Arduino
How To Make RFID & Keypad Based Door Lock
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 Interfacing With LDR Sensor
Ultrasonic Sensor as a Counter with Arduino
IoT Based Patient Health Monitoring System Using Blynk App
Nodemcu Interfacing With Em-18
OTP Based Door Lock Using Arduino And SIM800L
Esp32 Cam Based Face Unlock
MLX90614 Non-Contact Infrared Thermometer With Arduino
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments