Fingerprint Based Biometric Voting Machine using Arduino

Arduino

BySaddam 38

Finger Print Based Biometric Voting Machine using Arduino

We all are quite familiar with Electronic Voting Machines, where your vote gets registered electronically and you don’t need to use ballot paper to vote in election. Today security is a major concern and it also needs to be ensured that someone can’t vote twice, so this problem can be solved by introducing Finger Print Based Voting, where a person can be authorized based on his finger Print. This will also stops fake voting. So today we are building FingerPrint Based Biometric Voting Machine using Arduino.

Also check our previous Electronic Voting Machine Projects using different Microcontrollers:

 

Required Components:

  1. Arduino Uno
  2. Finger Print Sensor Module
  3. Push Buttons
  4. LEDs -2
  5. 1K Resistor -3
  6. 2.2K resistor
  7. Power
  8. Connecting wires
  9. Buzzer
  10. 16x2 LCD
  11. Bread Board

 

Finger Print Sensor Module in Voting Machine:

Finger Print Sensor Module or Finger Print Scanner is a module which captures finger’s print image and then converts it into the equivalent template and saves them into its memory on selected ID (location) by Arduino. Here all the process is commanded by Arduino like taking an image of finger print, convert it into templates and storing location etc.

Finger print sensor module

In this FingerPrint Voting Machine Circuit, we have used Finger Print Sensor Module to authenticate true voter by taking their finger input in the system. Here we are using 5 push buttons to Match, Enroll/back, Delete/OK, UP and Down. Enroll and Del key have double features here. Enroll key is used for enrolling new finger impression into the system and back function as well. Means when the user wants to enroll new finger then he/she needs to press enroll key then LCD asks for the ID or Location where user wants to store the finger print output. Now if at this time user do not want to proceed further then he/she can press enroll key again to go back (this time enroll key behave as Back key). Means enroll key has both enrollment and back function. DEL/OK key also has same double function like when user enrolls new finger then he/she need to select finger ID or Location by using another two key namely UP AND DOWN now user needs to press DEL/OK key (this time this key behaves like OK) to proceed with selected ID or Location. Match key is used for whenever voter wants to vote then he/she needs to authenticate first for true voter by keeping finger on Finger Print Sensor, if he/she passed in this authentication then he/she can vote.

finger print enrollment in biometric voting machine

To learn more about enrolling finger prints and other things, Check our previous tutorial on interfacing Finger Print Sensor with Arduino, and also check our Demo Video at the end of this tutorial.

 

Working Explanation:

Working of this Biometric Voting System for Election is a little bit complex for beginners. First of all, user needs to enroll finger or voters (in this code max limit of the voter is 25) with the help of push buttons/keys. To do this user need to press ENROLL key and then LCD asks for entering location/ID where finger will be a store. So now user needs to enter ID (Location) by using UP/DOWN keys. After selecting Location/ID user needs to press an OK key (DEL key). Now LCD will ask for placing finger over the finger print module. Now user needs to put his finger over finger print module. Then LCD will ask to remove the finger from finger print module and again ask for placing the finger. Now user needs to put his finger again over finger print module. Now finger print module takes an image and converts it into templates and stores it by selected ID in to the finger print module’s memory. Now voter will be registered and he/she can vote. By same method all the voter can be registered into the system.

Voting Machine block diagram

Now if the user wants to remove or delete any of stored ID then he/she need to press DEL key, after pressing DEL key, LCD will ask for select location means select ID that to be deleted. Now user needs to select ID and press OK key (same DEL key). Now LCD will let you know that finger has been deleted successfully.

 

Voting Process:

Now when user wants to vote then he/she needs to press match key and then buzzer will beep and LED will also glow and LCD will ask for place finger over fingerprint module. Now Arduino will give you three attempts to put your finger. After placing a finger over fingerprint module fingerprint module captures finger image find its IDs is present in the system. If finger ID detected then LCD will show authorized Voter. It means the user is authorized to vote. And then the system moves to next stage for voting. Now Green LED will glow it means now voter can vote for their candidates by pressing a relected key (from RED bread board in this demonstration). Now if the same voter wants to vote again then the system will show it ‘Already Voted’. Means same voter can’t vote again and buzzer will beep for 5 seconds. If any Non-registered user wants to vote then finger print module will not detect its ID into the system and LCD will show ‘No Fingerprint Found’

voting buttons in biometric voting machine using arduino

CAN1, CAN2, CAN3 here represents the Candidate 1, Candidate 2 and Candidate 3, who have stood for election.

 

Circuit Explanation:

The circuit of this FingerPrint Based Voting Machine Project is very simple which contains Arduino for controlling whole the process of the project, push button for enrolling, deleting, selecting IDs and voting purpose, a buzzer for alert, LEDs for indication and 16x2 LCD for instruct Voter and showing the result as well. Yellow LED indicates that fingerprint module is ready to take an image of the finger and Green LED indicates that system is ready to take a vote or see results.

finger print based biometric voting machine using arduino circuit diagram

The push button is directly connected to pin A0(ENROL), A1(DEL),  A2(UP), A3(DOWN) and A4(Match), D5(Can1), D4(Can2), D3(Can3), D2(Result) of Arduino with respect to ground. Yellow LED is connected at Digital pin D7 of Arduino with respect to ground through a 1k resistor and Green LED is connected to D6 of Arduino with the same method. Fingerprint module’s Rx and Tx directly connected at Serial pin Tx and Rx of Arduino. 5v supply is used for powering finger print module taken from Arduino board. A buzzer is also connected at A5. A 16x2 LCD is configured in 4-bit mode and its RS, EN, D4, D5, D6, and D7 are directly connected at Digital pin D13, D12, D11, D10, D9, and D8 of Arduino.

 

Program Explanation:

In a program, we have used Adafruit Fingerprint Sensor Library for interfacing fingerprint module with Arduino board. You can check the complete Code below. Here we are explaining main functions of the Arduino Program.

In setup function, we have given directions to defined pins and have initiated the LCD and Fingerprint module.

 

After it, in void loop() function, we have waited for check key and press Match key to start the finger print to take input and compare captured image id with stored IDs. If a match occurs then proceed with next step.

void loop() 
{
 lcd.setCursor(0,0);
 lcd.print("Press Match Key ");
 lcd.setCursor(0,1);
 lcd.print("to start system");
 
 digitalWrite(indVote, LOW);
 digitalWrite(indFinger, LOW);
 if(digitalRead(match)==0)
 {
  digitalWrite(buzzer, HIGH);
  delay(200);
  digitalWrite(buzzer, LOW);
  digitalWrite(indFinger, HIGH);
  for(int i=0;i<3;i++)
..... .....
....... ....

 

Given void checkKeys() function is used for checking Enroll or DEL key is pressed or not and what to do if pressed. If the ENROL key pressed the Enroll() function is called and DEL key press then delete() function is called.

void checkKeys()
{
   if(digitalRead(enroll) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    while(digitalRead(enroll) == 0);
    Enroll();
   }

   else if(digitalRead(del) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    delet();
   }  
}

 

Given function is used for entering ID to be deleted and calling uint8_t deleteFingerprint(uint8_t id) function that will delete finger from records.

void delet()
{
   int count=0;
   lcd.clear();
   lcd.print("Delete Finger    ");
   lcd.setCursor(0,1);
   lcd.print("Location:");
   while(1)
   {
     lcd.setCursor(9,1);
     lcd.print(count);
     if(digitalRead(up) == 0)
     {
       count++;
       if(count>25)
       count=0;
       delay(500);
     }
.... .....
..... .....

 

Given function is used for delete finger print from the record of selected ID.

uint8_t deleteFingerprint(uint8_t id) 
{
  uint8_t p = -1;  
  lcd.clear();
  lcd.print("Please wait");
  p = finger.deleteModel(id);
  if (p == FINGERPRINT_OK) 
  {
    Serial.println("Deleted!");
    lcd.clear();
    lcd.print("Figer Deleted");
    lcd.setCursor(0,1);
    lcd.print("Successfully");
    delay(1000);
  } 
  
  else 
  {
    Serial.print("Something Wrong"); 
    lcd.clear();
    lcd.print("Something Wrong");
    lcd.setCursor(0,1);
    lcd.print("Try Again Later");
    delay(2000);
    return p;
  }   
}

 

Given Function is used to taking finger print image and convert them into the template and save it by selected ID into the finger print module memory.

uint8_t getFingerprintEnroll() 
{
  int p = -1;
  lcd.clear();
  lcd.print("finger ID:");
  lcd.print(id);
  lcd.setCursor(0,1);
  lcd.print("Place Finger");
  delay(2000);
  while (p != FINGERPRINT_OK)
  {
    p = finger.getImage();
..... .....
....... ....

 

Given function is used for Voting and display results:

void Vote()
{
  lcd.clear();
  lcd.print("Please Place");
  lcd.setCursor(0,1);
  lcd.print("Your Vote");
  digitalWrite(indVote, HIGH);
  digitalWrite(indFinger, LOW);
  digitalWrite(buzzer, HIGH);
  delay(500);
  digitalWrite(buzzer, LOW);
  delay(1000);
  while(1)
  {
        if(digitalRead(sw1)==0)
..... .....
....... ....

 

Check the Full Code and demonstration Video Below.

Code
#include<EEPROM.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);
 
#include <Adafruit_Fingerprint.h>
uint8_t id;
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&Serial);
 
#define enroll 14
#define del 15
#define up 16
#define down 17
#define match 18
#define indVote 6
 
#define sw1 5
#define sw2 4
#define sw3 3
#define resultsw 2
#define indFinger 7
#define buzzer 19
#define records 25
int vote1,vote2,vote3;
 
int flag;
 
void setup() 
{
    delay(1000);
    pinMode(enroll, INPUT_PULLUP);
    pinMode(up, INPUT_PULLUP); 
    pinMode(down, INPUT_PULLUP); 
    pinMode(del, INPUT_PULLUP);
    pinMode(match, INPUT_PULLUP);
    pinMode(sw1, INPUT_PULLUP); 
    pinMode(sw2, INPUT_PULLUP);
    pinMode(sw3, INPUT_PULLUP);
    pinMode(resultsw, INPUT_PULLUP);
    pinMode(buzzer, OUTPUT);
    pinMode(indVote, OUTPUT);
    pinMode(indFinger, OUTPUT);
 
lcd.begin(16,2);
  if(digitalRead(resultsw) ==0)
  {
       for(int i=0;i<records;i++)
          EEPROM.write(i+10,0xff);
       EEPROM.write(0,0);
       EEPROM.write(1,0);
       EEPROM.write(2,0);
       lcd.clear();
       lcd.print("System Reset");
       delay(1000);
  }
    
    lcd.clear();
    lcd.print("Voting Machine");
    lcd.setCursor(0,1);
    lcd.print("by Finger Print");
    delay(2000);
    lcd.clear();
    lcd.print("Circuit Digest");
    lcd.setCursor(0,1);
    lcd.print("Saddam Khan");
    delay(2000);
 
  if(EEPROM.read(0) == 0xff)
   EEPROM.write(0,0);
 
     if(EEPROM.read(1) == 0xff)
   EEPROM.write(1,0);
 
     if(EEPROM.read(1) == 0xff)
   EEPROM.write(1,0);
 
   
      
    //finger.begin(57600);
    Serial.begin(57600);
    lcd.clear();
    lcd.print("Finding Module");
    lcd.setCursor(0,1);
    delay(1000);
    if (finger.verifyPassword()) 
    {
      //Serial.println("Found fingerprint sensor!");
      lcd.clear();
      lcd.print("Found Module ");
      delay(1000);
    } 
    else 
    {
    //Serial.println("Did not find fingerprint sensor :(");
    lcd.clear();
    lcd.print("module not Found");
    lcd.setCursor(0,1);
    lcd.print("Check Connections");
    while (1);
    }
 
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Cn1");
  lcd.setCursor(4,0);
  lcd.print("Cn2");
  lcd.setCursor(8,0);
  lcd.print("Cn3");
  lcd.setCursor(12,0);
  lcd.print("Cn4");
 
  lcd.setCursor(0,1);
  vote1=EEPROM.read(0);
  lcd.print(vote1);
  lcd.setCursor(6,1);
  vote2=EEPROM.read(1);
  lcd.print(vote2);
  lcd.setCursor(12,1);
  vote3=EEPROM.read(2);
  lcd.print(vote3);
  delay(2000);
}
 
void loop() 
{
 lcd.setCursor(0,0);
 lcd.print("Press Match Key ");
 lcd.setCursor(0,1);
 lcd.print("to start system");
 
 digitalWrite(indVote, LOW);
 digitalWrite(indFinger, LOW);
 if(digitalRead(match)==0)
 {
  digitalWrite(buzzer, HIGH);
  delay(200);
  digitalWrite(buzzer, LOW);
  digitalWrite(indFinger, HIGH);
  for(int i=0;i<3;i++)
  {
     lcd.clear();
    lcd.print("Place Finger");
    delay(2000);
    int result=getFingerprintIDez();
    if(result>=0)
    {
      flag=0;
        for(int i=0;i<records;i++)
        {
          if(result == EEPROM.read(i+10))
          {
             lcd.clear();
              lcd.print("Authorised Voter");
              lcd.setCursor(0,1);
              lcd.print("Please Wait....");
              delay(1000);
              Vote();
              EEPROM.write(i+10, 0xff);
              flag=1;
              return;
          }
        }
 
        if(flag == 0)
        {
        lcd.clear();
        lcd.print("Already Voted");
        //lcd.setCursor(0,1);
        //lcd.print("")
        digitalWrite(buzzer, HIGH);
        delay(5000);
        digitalWrite(buzzer, LOW);
        return;
        }
     }
   }
   lcd.clear();
 }
 checkKeys();
 delay(1000);
}
 
void checkKeys()
{
   if(digitalRead(enroll) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    while(digitalRead(enroll) == 0);
    Enroll();
   }
 
   else if(digitalRead(del) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    delet();
   }  
}
 
void Enroll()
{
   int count=0;
   lcd.clear();
   lcd.print("Enter Finger ID:");
   
   while(1)
   {
    lcd.setCursor(0,1);
     lcd.print(count);
     if(digitalRead(up) == 0)
     {
       count++;
       if(count>25)
       count=0;
       delay(500);
     }
 
     else if(digitalRead(down) == 0)
     {
       count--;
       if(count<0)
       count=25;
       delay(500);
     }
     else if(digitalRead(del) == 0)
     {
          id=count;
          getFingerprintEnroll();
          for(int i=0;i<records;i++)
          {
            if(EEPROM.read(i+10) == 0xff)
            {
              EEPROM.write(i+10, id);
              break;
            }
          }
          return;
     }
 
       else if(digitalRead(enroll) == 0)
     {        
          return;
     }
 }
}
 
void delet()
{
   int count=0;
   lcd.clear();
   lcd.print("Enter Finger ID");
   
   while(1)
   {
    lcd.setCursor(0,1);
     lcd.print(count);
     if(digitalRead(up) == 0)
     {
       count++;
       if(count>25)
       count=0;
       delay(500);
     }
 
     else if(digitalRead(down) == 0)
     {
       count--;
       if(count<0)
       count=25;
       delay(500);
     }
     else if(digitalRead(del) == 0)
     {
          id=count;
          deleteFingerprint(id);
          for(int i=0;i<records;i++)
          {
            if(EEPROM.read(i+10) == id)
            {
              EEPROM.write(i+10, 0xff);
              break;
            }
          }
          return;
     }
       else if(digitalRead(enroll) == 0)
     {        
          return;
     }
 }
}
 
uint8_t getFingerprintEnroll() 
{
  int p = -1;
  lcd.clear();
  lcd.print("finger ID:");
  lcd.print(id);
  lcd.setCursor(0,1);
  lcd.print("Place Finger");
  delay(2000);
  while (p != FINGERPRINT_OK)
  {
    p = finger.getImage();
    switch (p)
    {
    case FINGERPRINT_OK:
      //Serial.println("Image taken");
      lcd.clear();
      lcd.print("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      //Serial.println("No Finger");
      lcd.clear();
      lcd.print("No Finger");
      break;
    case FINGERPRINT_PACKETRECIEVEERR:
      //Serial.println("Communication error");
      lcd.clear();
      lcd.print("Comm Error");
      break;
    case FINGERPRINT_IMAGEFAIL:
      //Serial.println("Imaging error");
      lcd.clear();
      lcd.print("Imaging Error");
      break;
    default:
      //Serial.println("Unknown error");
       lcd.clear();
      lcd.print("Unknown Error");
      break;
    }
  }
 
  // OK success!
 
  p = finger.image2Tz(1);
  switch (p) {
    case FINGERPRINT_OK:
      //Serial.println("Image converted");
      lcd.clear();
      lcd.print("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      //Serial.println("Image too messy");
       lcd.clear();
       lcd.print("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      //Serial.println("Communication error");
            lcd.clear();
      lcd.print("Comm Error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      //Serial.println("Could not find fingerprint features");
            lcd.clear();
      lcd.print("Feature Not Found");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      //Serial.println("Could not find fingerprint features");
                  lcd.clear();
      lcd.print("Feature Not Found");
      return p;
    default:
      //Serial.println("Unknown error");
                  lcd.clear();
      lcd.print("Unknown Error");
      return p;
  }
  
  //Serial.println("Remove finger");
  lcd.clear();
  lcd.print("Remove Finger");
  delay(2000);
  p = 0;
  while (p != FINGERPRINT_NOFINGER) {
    p = finger.getImage();
  }
  //Serial.print("ID "); //Serial.println(id);
  p = -1;
  //Serial.println("Place same finger again");
   lcd.clear();
      lcd.print("Place Finger");
      lcd.setCursor(0,1);
      lcd.print("   Again");
  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    switch (p) {
    case FINGERPRINT_OK:
      //Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      //Serial.print(".");
      break;
    case FINGERPRINT_PACKETRECIEVEERR:
      //Serial.println("Communication error");
      break;
    case FINGERPRINT_IMAGEFAIL:
      //Serial.println("Imaging error");
      break;
    default:
      //Serial.println("Unknown error");
      return;
    }
  }
 
  // OK success!
 
  p = finger.image2Tz(2);
  switch (p) {
    case FINGERPRINT_OK:
      //Serial.println("Image converted");
      break;
    case FINGERPRINT_IMAGEMESS:
      //Serial.println("Image too messy");
      return p;
    case FINGERPRINT_PACKETRECIEVEERR:
      //Serial.println("Communication error");
      return p;
    case FINGERPRINT_FEATUREFAIL:
      //Serial.println("Could not find fingerprint features");
      return p;
    case FINGERPRINT_INVALIDIMAGE:
      //Serial.println("Could not find fingerprint features");
      return p;
    default:
      //Serial.println("Unknown error");
      return p;
  }
  
  // OK converted!
  //Serial.print("Creating model for #");  //Serial.println(id);
  
  p = finger.createModel();
  if (p == FINGERPRINT_OK) {
    //Serial.println("Prints matched!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    //Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_ENROLLMISMATCH) {
    //Serial.println("Fingerprints did not match");
    return p;
  } else {
    //Serial.println("Unknown error");
    return p;
  }   
  
  //Serial.print("ID "); //Serial.println(id);
  p = finger.storeModel(id);
  if (p == FINGERPRINT_OK) {
    //Serial.println("Stored!");
    lcd.clear();
    lcd.print("Stored!");
    delay(2000);
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    //Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_BADLOCATION) {
    //Serial.println("Could not store in that location");
    return p;
  } else if (p == FINGERPRINT_FLASHERR) {
    //Serial.println("Error writing to flash");
    return p;
  }
  else {
    //Serial.println("Unknown error");
    return p;
  }   
}
 
int getFingerprintIDez()
{
  uint8_t p = finger.getImage();
  
  if (p != FINGERPRINT_OK)  
  return -1;
 
  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  
  return -1;
 
  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)
  {
   lcd.clear();
   lcd.print("Finger Not Found");
   lcd.setCursor(0,1);
   lcd.print("Try Later");
   delay(2000);  
  return -1;
  }
  // found a match!
  //Serial.print("Found ID #"); 
  //Serial.print(finger.fingerID); 
  return finger.fingerID; 
}
 
uint8_t deleteFingerprint(uint8_t id) 
{
  uint8_t p = -1;  
  lcd.clear();
  lcd.print("Please wait");
  p = finger.deleteModel(id);
  if (p == FINGERPRINT_OK) 
  {
    //Serial.println("Deleted!");
    lcd.clear();
    lcd.print("Figer Deleted");
    lcd.setCursor(0,1);
    lcd.print("Successfully");
    delay(1000);
  } 
  
  else 
  {
    //Serial.print("Something Wrong"); 
    lcd.clear();
    lcd.print("Something Wrong");
    lcd.setCursor(0,1);
    lcd.print("Try Again Later");
    delay(2000);
    return p;
  }   
}
 
void Vote()
{
  lcd.clear();
  lcd.print("Please Place");
  lcd.setCursor(0,1);
  lcd.print("Your Vote");
  digitalWrite(indVote, HIGH);
  digitalWrite(indFinger, LOW);
  digitalWrite(buzzer, HIGH);
  delay(500);
  digitalWrite(buzzer, LOW);
  delay(1000);
  while(1)
  {
        if(digitalRead(sw1)==0)
        {
          vote1++;
          voteSubmit(1);
          EEPROM.write(0, vote1);
          while(digitalRead(sw1)==0);
          return;
        }
        if(digitalRead(sw2)==0)
        {
          vote2++;
            voteSubmit(2);
            EEPROM.write(1, vote2);
          while(digitalRead(sw2)==0);
          return;
        }
        if(digitalRead(sw3)==0)
        {
          vote3++;
             voteSubmit(3);
             EEPROM.write(2, vote3);
          while(digitalRead(sw3)==0);
          return;
        }
        
         if(digitalRead(resultsw)==0)
         {
              lcd.clear();
              lcd.setCursor(0,0);
              lcd.print("Can1");
              lcd.setCursor(6,0);
              lcd.print("Can2");
              lcd.setCursor(12,0);
              lcd.print("Can3");
              for(int i=0;i<3;i++)
              {
                lcd.setCursor(i*6,1);
                lcd.print(EEPROM.read(i));
              }
              delay(2000);
           int vote=vote1+vote2+vote3;
           if(vote)
           {
            if((vote1 > vote2 && vote1 > vote3))
            {
             lcd.clear();
             lcd.print("Can1 Wins");
             delay(2000);
             lcd.clear();
            }
            else if(vote2 > vote1 && vote2 > vote3)
            {
             lcd.clear();
             lcd.print("Can2 Wins");
             delay(2000);
             lcd.clear();
            }
            else if((vote3 > vote1 && vote3 > vote2))
            {
             lcd.clear();
             lcd.print("Can3 Wins");
             delay(2000);
             lcd.clear();
            }
           
           else
           {
             lcd.clear();
             lcd.print("   Tie Up Or   ");
             lcd.setCursor(0,1);
             lcd.print("   No Result   ");
             delay(1000);
             lcd.clear();
           }
           
          }      
           else 
           {
             lcd.clear();
             lcd.print("No Voting....");
             delay(1000);
             lcd.clear();
           }
           vote1=0;vote2=0;vote3=0;vote=0;
           lcd.clear();
           return;
         }
  }
   digitalWrite(indVote, LOW);
}
 
void voteSubmit(int cn)
{
  lcd.clear();
  if(cn == 1)
      lcd.print("Can1");
  else if(cn == 2)
      lcd.print("Can2");
  else if(cn == 3)
      lcd.print("Can3");
  lcd.setCursor(0,1);
  lcd.print("Vote Submitted");
  digitalWrite(buzzer , HIGH);
  delay(1000);
  digitalWrite(buzzer, LOW);
  digitalWrite(indVote, LOW);
  return;
}
Video

Comments

  • saqib hussnain's picture
    saqib hussnain
    Aug 08, 2017

    embedded system is good

  • Aaditya's picture
    Aaditya
    Oct 08, 2017

    Sir, in this code there comes an error in line 405 .Why?

  • Tarik's picture
    Tarik
    Oct 20, 2017

    In line 7 there is a status in the output, named
    "exit status 1
    no matching function for call to 'Adafruit_Fingerprint::Adafruit_Fingerprint(HardwareSerial*)'"
    How can i solve the problem??

  • redha 's picture
    redha
    Oct 22, 2017

    I have same problem what the solution ?????
    this copy of the message :-
    Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

    D:\project\arduino-1.8.2\waterver1\waterver1.ino:9:34: fatal error: Adafruit_Fingerprint.h: No such file or directory

    #include <Adafruit_Fingerprint.h>

    ^

    compilation terminated.

    Multiple libraries were found for "LiquidCrystal.h"
    Used: C:\Users\classroom\Documents\Arduino\libraries\LiquidCrystal
    Not used: C:\Users\classroom\Desktop\arduino-1.8.1\libraries\LiquidCrystal
    exit status 1
    Error compiling for board Arduino/Genuino Uno.

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • atul's picture
    atul
    Oct 26, 2017

    instead of fingerprint rs 305 can i use gt511c3.... if yes then will coding remains the same for fingerprint gt511c3 ...???? waiting for the reply ...

  • B.Aswinth Raj's picture
    B.Aswinth Raj
    Oct 26, 2017

    Hi atul,

    Replacing rs305 with GT511c3 will make few changes in circuit and code. You cannot you that one in this project without these changes

  • Yashraj Thakur's picture
    Yashraj Thakur
    Dec 18, 2017

    error coming on first line other are ok plzz help waiting for reply

  • aken chris's picture
    aken chris
    Jan 21, 2018

    please i wish to find out if is it possible to make the system in a way that if somebody has already voted and wants to vote the second time the system indicate error

  • AISHA's picture
    AISHA
    Jan 23, 2018

    It is easily possible with few tweaks in the code

  • lins's picture
    lins
    Jan 25, 2018

    how can add the tweaks in the code that you said ......please reply

  • Aayush's picture
    Aayush
    Jan 30, 2018

    So, if i use a fingerprint module that is not rs305...will i have to make some changes?

  • Bamshak's picture
    Bamshak
    Feb 25, 2018

    Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

    C:\Users\NAPHTA~1.JEL\AppData\Local\Temp\arduino_modified_sketch_407403\toneMelody.ino:5:34: fatal error: Adafruit_Fingerprint.h: No such file or directory

    #include <Adafruit_Fingerprint.h>

    ^

    compilation terminated.

    exit status 1
    Pls anyone with the solution to this error?
    Thanks

    Error compiling for board Arduino/Genuino Uno.

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • B.Aswinth Raj's picture
    B.Aswinth Raj
    Feb 26, 2018

    You have not downloaded and added the Adafruit_Fingerprint library properly. Read the article patiently and add the library 

  • Bamshak's picture
    Bamshak
    Mar 13, 2018

    Sorry, I had not installed the library
    I've done that now, and the program has been compiled successfully
    Thanks

  • nasri ahmed's picture
    nasri ahmed
    May 08, 2018

    plz send me correct code

  • kolleyjay 's picture
    kolleyjay
    Aug 06, 2018

    please I have the same problem compiling the code, please tell me how you add the fingerprint library. thanks

  • K S NIRMAL KUMAR's picture
    K S NIRMAL KUMAR
    Feb 27, 2018

    hi, i am nirmal kumar, doing my B.E., ECE , now i am doing my project in biometric voting system, i am using your above given code, and i am getting error as module not found, tell me how to verify the fingerprint and if posiible please send me the full correct code for this project & give a solution for checking the fingerprint module

    In function 'uint8_t getFingerprintEnroll()':

    warning: return-statement with no value, in function returning 'uint8_t {aka unsigned char}' [-fpermissive]

    return;

    i am getting these errors help me how to resolve it.

  • Ace chris's picture
    Ace chris
    Mar 03, 2018

    please sir i wish to find out if is it possible to link the system to a database where the results could be seen in real time, i.e. to say we design a database that we could link to a website to be viewing results as the vote is being cast. please waiting for ur reply i will be grateful if u reply me

  • hisense's picture
    hisense
    Mar 03, 2018

    can i use r305 finger prints module with out any code change

  • hisense's picture
    hisense
    Mar 06, 2018

    Sorry, I mean R307.. Not R305

  • ravi's picture
    ravi
    Jul 16, 2018

    Please provide me the link for R305 finger module to design using proteus.
    Provide me the link for R305 finger print module library for proteus...

  • hisense's picture
    hisense
    Mar 06, 2018

    R307

    Can i use R307 finger prints module with out any code change?

  • HARI's picture
    HARI
    Mar 12, 2018

    good
    really hot
    easy to use
    cheep aurdino

  • Bamshak's picture
    Bamshak
    Mar 13, 2018

    After compiling successfully, the codes could not be uploaded to the arduino uno board, an error message was displayed. Here's the error message:

    Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

    C:\Users\UNIJOS~1\AppData\Local\Temp\arduino_modified_sketch_488601\sketch_mar13b.ino: In function 'uint8_t getFingerprintEnroll()':

    C:\Users\UNIJOS~1\AppData\Local\Temp\arduino_modified_sketch_488601\sketch_mar13b.ino:405:7: warning: return-statement with no value, in function returning 'uint8_t {aka unsigned char}' [-fpermissive]

    return;

    ^

    Sketch uses 8052 bytes (24%) of program storage space. Maximum is 32256 bytes.
    Global variables use 947 bytes (46%) of dynamic memory, leaving 1101 bytes for local variables. Maximum is 2048 bytes.
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x06
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfe
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x06
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7e
    An error occurred while uploading the sketch

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • Golla Reddy prasad's picture
    Golla Reddy prasad
    Mar 17, 2018

    I want this circuit

  • Abhishek's picture
    Abhishek
    Apr 09, 2018

    I m not geeting it im using a 6 wired fingerprint sensor thst it it is the only difference btwn ur nd mine circuit plzz hlp me my project is has to be done before 11 aprail 2018 plzz hlp me with this

  • dan hodge's picture
    dan hodge
    Apr 11, 2018

    cant get it to work code keeps giving me a cant compile error message.

  • Shailesh patil's picture
    Shailesh patil
    Apr 29, 2018

    Please help us.
    After compiled of program it shows fingerprint module not found.

  • Dariya 's picture
    Dariya
    May 23, 2018

    After uploading the code on arduono and also having the ada fruit library, I get module not found, check connection on the lcd. I make use of pins 0, 1

  • Zahid Hanif's picture
    Zahid Hanif
    May 28, 2018

    I did the same project and my circuit is working but the program is going straight to place finger and please wait immediately after showing the first loop instead it should wait for me to press a key to go ahead. I am using the same components as you and also the same circuit..
    Main problem is that it is not waiting after saying press match key for me to actually pressing anything.

  • Michael's picture
    Michael
    May 30, 2018

    I wanna have code that can work with DY50 finger print

  • Michael's picture
    Michael
    Jun 05, 2018

    #include<EEPROM.h>
    #include<LiquidCrystal.h>
    #include <SoftwareSerial.h>
    SoftwareSerial mySerial(2, 3);
    LiquidCrystal lcd(12,11,7,6,5,4);
    #include <Adafruit_Fingerprint.h>
    uint8_t id;
    Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

    #define enroll 14
    #define del 15
    #define up 16
    #define down 17
    #define match 18
    #define indVote 7

    #define sw1 8
    #define sw2 9
    #define sw3 10
    #define resultsw 13
    #define indFinger 3
    #define buzzer 19
    #define records 25
    int vote1,vote2,vote3;

    int flag;

    void setup()
    {

    delay(1000);
    pinMode(enroll, INPUT);
    pinMode(up, INPUT);
    pinMode(down, INPUT);
    pinMode(del, INPUT);
    pinMode(match, INPUT);
    pinMode(sw1, INPUT);
    pinMode(sw2, INPUT);
    pinMode(sw3, INPUT);
    pinMode(resultsw, INPUT_PULLUP);
    pinMode(buzzer, OUTPUT);
    pinMode(indVote, OUTPUT);
    pinMode(indFinger, OUTPUT);

    lcd.begin(16,2);
    if(digitalRead(resultsw) ==0)
    {
    for(int i=0;i<records;i++)
    EEPROM.write(i+10,0xff);
    EEPROM.write(0,0);
    EEPROM.write(1,0);
    EEPROM.write(2,0);
    lcd.clear();
    lcd.print("System Reset");
    delay(1000);
    }

    lcd.clear();
    lcd.print("Voting Machine");
    ////Serial.println("Voting MACHINE");
    lcd.setCursor(0,1);
    lcd.print("by Finger Print");
    //Serial.println("Using Finger Print");
    delay(200);
    lcd.clear();
    lcd.print("CSE");
    //Serial.println("CST YEAR 4");
    lcd.setCursor(0,1);
    lcd.print("MIC LUCIE ALINE");
    //Serial.println("Group 24");
    delay(200);
    digitalWrite(enroll, HIGH);
    digitalWrite(del, HIGH);
    digitalWrite(up, HIGH);
    digitalWrite(down, HIGH);
    digitalWrite(match, HIGH);

    if(EEPROM.read(0) == 0xff)
    EEPROM.write(0,0);

    if(EEPROM.read(1) == 0xff)
    EEPROM.write(1,0);

    if(EEPROM.read(1) == 0xff)
    EEPROM.write(1,0);

    finger.begin(57600);
    Serial.begin(57600);
    lcd.clear();
    lcd.print("Finding Module");
    //Serial.println("Finding Module");
    lcd.setCursor(0,1);
    delay(1000);

    if (finger.verifyPassword())
    {
    //Serial.println("Found fingerprint sensor!");
    lcd.clear();
    lcd.print("Found Module ");
    delay(1000);
    }
    else
    {
    //Serial.println("Did not find fingerprint sensor :(");
    lcd.clear();
    lcd.print("module not Found");
    lcd.setCursor(0,1);
    lcd.print("Check Connections");
    while (1);
    }

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Cn1");
    //Serial.println("CAN1");
    lcd.setCursor(4,0);
    lcd.print("Cn2");
    //Serial.println("CAN2");
    lcd.setCursor(8,0);
    lcd.print("Cn3");
    //Serial.println("CAN3");
    lcd.setCursor(12,0);
    lcd.print(" ");

    lcd.setCursor(0,1);
    vote1=EEPROM.read(0);
    lcd.print(vote1);
    lcd.setCursor(6,1);
    vote2=EEPROM.read(1);
    lcd.print(vote2);
    lcd.setCursor(10,1);
    vote3=EEPROM.read(2);
    lcd.print(vote3);
    delay(6000);
    }

    void loop()
    {
    lcd.setCursor(0,0);
    lcd.print("Press Match Key ");
    //Serial.println("Press Match Key");
    lcd.setCursor(0,1);
    lcd.print("to start system");
    //Serial.println("to start system");

    digitalWrite(indVote, LOW);
    digitalWrite(indFinger, LOW);
    if(digitalRead(match)==0)
    {
    digitalWrite(buzzer, HIGH);
    delay(200);
    digitalWrite(buzzer, LOW);
    digitalWrite(indFinger, HIGH);
    for(int i=0;i<3;i++)
    {
    lcd.clear();
    lcd.print("Place Finger");
    //Serial.println("Press Finger");
    delay(2000);
    int result=getFingerprintIDez();
    //Serial.println(result);
    if(result>=0)
    {
    flag=0;
    for(int i=0;i<records;i++)
    {
    if(result == EEPROM.read(i+10))
    {
    lcd.clear();
    lcd.print("Authorised Voter");
    //Serial.print("Authorized Voter");
    lcd.setCursor(0,1);
    lcd.print("Please Wait....");
    //Serial.print("Please Wait");
    delay(1000);
    Vote();
    EEPROM.write(i+10, 0xff);
    flag=1;
    return;
    }
    }

    if(flag == 0)
    {
    lcd.clear();
    lcd.print("Already Voted");
    //Serial.println("Already Voted");
    //lcd.setCursor(0,1);
    //lcd.print("")
    digitalWrite(buzzer, HIGH);
    delay(5000);
    digitalWrite(buzzer, LOW);
    return;
    }
    }
    }
    lcd.clear();
    }
    checkKeys();
    delay(1000);
    }

    void checkKeys()
    {
    if(digitalRead(enroll) == 0)
    {
    lcd.clear();
    lcd.print("Please Wait");
    //Serial.println("Please Wait");
    delay(1000);
    while(digitalRead(enroll) == 0);
    Enroll();
    }

    else if(digitalRead(del) == 0)
    {
    lcd.clear();
    lcd.print("Please Wait");
    //Serial.println("Please Wait");
    delay(1000);
    delet();
    }
    }

    void Enroll()
    {
    int count=0;
    lcd.clear();
    lcd.print("Enter Finger ID:");
    //Serial.println("Enter Finger ID:");

    while(1)
    {
    lcd.setCursor(0,1);
    lcd.print(count);
    //Serial.print(count);
    if(digitalRead(up) == 0)
    {
    count++;
    if(count>25)
    count=0;
    delay(500);
    }

    else if(digitalRead(down) == 0)
    {
    count--;
    if(count<0)
    count=25;
    delay(500);
    }
    else if(digitalRead(del) == 0)
    {
    id=count;
    getFingerprintEnroll();
    for(int i=0;i<records;i++)
    {
    if(EEPROM.read(i+10) == 0xff)
    {
    EEPROM.write(i+10, id);
    break;
    }
    }
    return;
    }

    else if(digitalRead(enroll) == 0)
    {
    return;
    }
    }
    }

    void delet()
    {
    int count=0;
    lcd.clear();
    lcd.print("Enter Finger ID");
    //Serial.println("Enter Finger ID");
    while(1)
    {
    lcd.setCursor(0,1);
    lcd.print(count);
    //Serial.println(count);
    if(digitalRead(up) == 0)
    {
    count++;
    if(count>25)
    count=0;
    delay(500);
    }

    else if(digitalRead(down) == 0)
    {
    count--;
    if(count<0)
    count=25;
    delay(500);
    }
    else if(digitalRead(del) == 0)
    {
    id=count;
    deleteFingerprint(id);
    for(int i=0;i<records;i++)
    {
    if(EEPROM.read(i+10) == id)
    {
    EEPROM.write(i+10, 0xff);
    break;
    }
    }
    return;
    }
    else if(digitalRead(enroll) == 0)
    {
    return;
    }
    }
    }

    uint8_t getFingerprintEnroll()
    {
    int p = -1;
    lcd.clear();
    lcd.print("finger ID:");
    //Serial.println("finger ID:");
    lcd.print(id);
    lcd.setCursor(0,1);
    lcd.print("Place Finger");
    //Serial.println("Place Finger");
    delay(2000);
    while (p != FINGERPRINT_OK)
    {
    p = finger.getImage();
    switch (p)
    {
    case FINGERPRINT_OK:
    //Serial.println("Image taken");
    lcd.clear();
    lcd.print("Image taken");
    break;
    case FINGERPRINT_NOFINGER:
    //Serial.println("No Finger");
    lcd.clear();
    lcd.print("No Finger");
    break;
    case FINGERPRINT_PACKETRECIEVEERR:
    //Serial.println("Communication error");
    lcd.clear();
    lcd.print("Comm Error");

    break;
    case FINGERPRINT_IMAGEFAIL:
    //Serial.println("Imaging error");
    lcd.clear();
    lcd.print("Imaging Error");
    //Serial.println("Imaging Error");
    break;
    default:
    //Serial.println("Unknown error");
    lcd.clear();
    lcd.print("Unknown Error");

    break;
    }
    }

    // OK success!

    p = finger.image2Tz(1);
    switch (p) {
    case FINGERPRINT_OK:
    //Serial.println("Image converted");
    lcd.clear();
    lcd.print("Image converted");
    break;
    case FINGERPRINT_IMAGEMESS:
    //Serial.println("Image too messy");
    lcd.clear();
    lcd.print("Image too messy");
    return p;
    case FINGERPRINT_PACKETRECIEVEERR:
    //Serial.println("Communication error");
    lcd.clear();
    lcd.print("Comm Error");
    return p;
    case FINGERPRINT_FEATUREFAIL:
    //Serial.println("Could not find fingerprint features");
    lcd.clear();
    lcd.print("Feature Not Found");
    return p;
    case FINGERPRINT_INVALIDIMAGE:
    //Serial.println("Could not find fingerprint features");
    lcd.clear();
    lcd.print("Feature Not Found");
    return p;
    default:
    //Serial.println("Unknown error");
    lcd.clear();
    lcd.print("Unknown Error");
    return p;
    }

    //Serial.println("Remove finger");
    lcd.clear();
    lcd.print("Remove Finger");
    delay(2000);
    p = 0;
    while (p != FINGERPRINT_NOFINGER) {
    p = finger.getImage();
    }
    //Serial.print("ID "); ////Serial.println(id);
    p = -1;
    //Serial.println("Place same finger again");
    lcd.clear();
    lcd.print("Place Finger");
    lcd.setCursor(0,1);
    lcd.print(" Again");
    while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    switch (p) {
    case FINGERPRINT_OK:
    //Serial.println("Image taken");
    break;
    case FINGERPRINT_NOFINGER:
    //Serial.print(".");
    break;
    case FINGERPRINT_PACKETRECIEVEERR:
    //Serial.println("Communication error");
    break;
    case FINGERPRINT_IMAGEFAIL:
    //Serial.println("Imaging error");
    break;
    default:
    //Serial.println("Unknown error");
    return;
    }
    }

    // OK success!

    p = finger.image2Tz(2);
    switch (p) {
    case FINGERPRINT_OK:
    //Serial.println("Image converted");
    break;
    case FINGERPRINT_IMAGEMESS:
    //Serial.println("Image too messy");
    return p;
    case FINGERPRINT_PACKETRECIEVEERR:
    //Serial.println("Communication error");
    return p;
    case FINGERPRINT_FEATUREFAIL:
    //Serial.println("Could not find fingerprint features");
    return p;
    case FINGERPRINT_INVALIDIMAGE:
    //Serial.println("Could not find fingerprint features");
    return p;
    default:
    //Serial.println("Unknown error");
    return p;
    }

    // OK converted!
    //Serial.print("Creating model for #"); ////Serial.println(id);

    p = finger.createModel();
    if (p == FINGERPRINT_OK) {
    //Serial.println("Prints matched!");
    } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    //Serial.println("Communication error");
    return p;
    } else if (p == FINGERPRINT_ENROLLMISMATCH) {
    //Serial.println("Fingerprints did not match");
    return p;
    } else {
    //Serial.println("Unknown error");
    return p;
    }

    //Serial.print("ID "); ////Serial.println(id);
    p = finger.storeModel(id);
    if (p == FINGERPRINT_OK) {
    //Serial.println("Stored!");
    lcd.clear();
    lcd.print("Stored!");
    delay(2000);
    } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    //Serial.println("Communication error");
    return p;
    } else if (p == FINGERPRINT_BADLOCATION) {
    //Serial.println("Could not store in that location");
    return p;
    } else if (p == FINGERPRINT_FLASHERR) {
    //Serial.println("Error writing to flash");
    return p;
    }
    else {
    //Serial.println("Unknown error");
    return p;
    }
    }

    int getFingerprintIDez()
    {
    uint8_t p = finger.getImage();

    if (p != FINGERPRINT_OK)
    return -1;

    p = finger.image2Tz();
    if (p != FINGERPRINT_OK)
    return -1;

    p = finger.fingerFastSearch();
    if (p != FINGERPRINT_OK)
    {
    lcd.clear();
    lcd.print("Finger Not Found");
    lcd.setCursor(0,1);
    lcd.print("Try Later");
    delay(2000);
    return -1;
    }
    // found a match!
    //Serial.print("Found ID #");
    //Serial.print(finger.fingerID);
    return finger.fingerID;
    }

    uint8_t deleteFingerprint(uint8_t id)
    {
    uint8_t p = -1;
    lcd.clear();
    lcd.print("Please wait");
    p = finger.deleteModel(id);
    if (p == FINGERPRINT_OK)
    {
    //Serial.println("Deleted!");
    lcd.clear();
    lcd.print("Figer Deleted");
    lcd.setCursor(0,1);
    lcd.print("Successfully");
    delay(1000);
    }

    else
    {
    //Serial.print("Something Wrong");
    lcd.clear();
    lcd.print("Something Wrong");
    lcd.setCursor(0,1);
    lcd.print("Try Again Later");
    //Serial.println("Try Again Later");
    delay(2000);
    return p;
    }
    }

    void Vote()
    {
    lcd.clear();
    lcd.print("Please Place");
    //Serial.println("Please Place");
    lcd.setCursor(0,1);
    lcd.print("Your Vote");
    digitalWrite(indVote, HIGH);
    digitalWrite(indFinger, LOW);
    digitalWrite(buzzer, HIGH);
    delay(500);
    digitalWrite(buzzer, LOW);

    //The Voting Button
    digitalWrite(sw1, HIGH);
    digitalWrite(sw2, HIGH);
    digitalWrite(sw3, HIGH);
    digitalWrite(resultsw, HIGH);

    delay(1000);
    while(1)
    {
    if(digitalRead(sw1)==0)
    {
    vote1++;
    voteSubmit(1);
    EEPROM.write(0, vote1);
    while(digitalRead(sw1)==0);
    return;
    }
    if(digitalRead(sw2)==0)
    {
    vote2++;
    voteSubmit(2);
    EEPROM.write(1, vote2);
    while(digitalRead(sw2)==0);
    return;
    }
    if(digitalRead(sw3)==0)
    {
    vote3++;
    voteSubmit(3);
    EEPROM.write(2, vote3);
    while(digitalRead(sw3)==0);
    return;
    }

    if(digitalRead(resultsw)==0)
    {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Can1");
    lcd.setCursor(6,0);
    lcd.print("Can2");
    lcd.setCursor(12,0);
    lcd.print("Can3");
    for(int i=0;i<3;i++)
    {
    lcd.setCursor(i*6,1);
    lcd.print(EEPROM.read(i));
    }
    delay(2000);
    int vote=vote1+vote2+vote3;
    if(vote)
    {
    if((vote1 > vote2 && vote1 > vote3))
    {
    lcd.clear();
    lcd.print("Can1 Wins");
    //Serial.println("CAN1 Wins");
    delay(2000);
    lcd.clear();
    }
    else if(vote2 > vote1 && vote2 > vote3)
    {
    lcd.clear();
    lcd.print("Can2 Wins");
    //Serial.println("CAN2 Wins");
    delay(2000);
    lcd.clear();
    }
    else if((vote3 > vote1 && vote3 > vote2))
    {
    lcd.clear();
    lcd.print("Can3 Wins");
    //Serial.println("CAN3 Wins");
    delay(2000);
    lcd.clear();
    }

    else
    {
    lcd.clear();
    lcd.print(" Tie Up Or ");
    //Serial.println(" Tie Up or ");
    lcd.setCursor(0,1);
    lcd.print(" No Result ");
    //Serial.println(" No Result ");
    delay(1000);
    lcd.clear();
    }

    }
    else
    {
    lcd.clear();
    lcd.print("No Voting....");
    //Serial.println("CAN3 Wins");
    delay(1000);
    lcd.clear();
    }
    vote1=0;vote2=0;vote3=0;vote=0;
    lcd.clear();
    return;
    }
    }
    digitalWrite(indVote, LOW);
    }

    void voteSubmit(int cn)
    {
    lcd.clear();
    if(cn == 1)
    lcd.print("Can1");
    else if(cn == 2)
    lcd.print("Can2");
    else if(cn == 3)
    lcd.print("Can3");
    lcd.setCursor(0,1);
    lcd.print("Vote Submitted");
    //Serial.println("Vote Submitted");
    digitalWrite(buzzer , HIGH);
    delay(1000);
    digitalWrite(buzzer, LOW);
    digitalWrite(indVote, LOW);
    return;
    }

  • Dhanushka Nuwan Kumara's picture
    Dhanushka Nuwan...
    Jul 03, 2018

    plz help me to find liquid crystal library for this project

  • sai teja's picture
    sai teja
    Jul 12, 2018

    even after installing the adafruit library and executing the program without any errors it is showing that "module not found please check the connection" in lcd

  • kolleyjay 's picture
    kolleyjay
    Jul 30, 2018

    please which compiler can I use to compile the code

  • kolleyjay 's picture
    kolleyjay
    Aug 03, 2018

    after adding adafruit library, the code still not compile, it reporting "adafruit_fingerprint.h :no such file or directory". please help

  • Ian's picture
    Ian
    Aug 06, 2018

    Hello my friend,
    I have tried your program, and it works!! :D
    But when it comes to the MATCH button, the fingerprint sensor works when it wants to work...
    Sometimes it reads, most times it does not.
    So it is hard to authenticate a voter
    Maybe it could be a cheap fingerprint sensor?

  • AISHA's picture
    AISHA
    Aug 09, 2018

    Make sure there is no loose connection and the program is not reseting itself 

Leave a Comment