IoT Based Fingerprint Biometric Attendance System using NodeMCU
Smart Attendance system using fingerprint sensor with ESP8266
Introduction
In this article, I will explain to you how to build an IoT-based Fingerprint biometric attendance system using NodeMCU(ESP8266).0.96” OLED Display,R-307 Fingerprint Sensor.
The NodeMCU is a Wi-Fi module that will collect all fingerprint data from different users and send it over the internet to a website. the fingerprint enrolment is done on the server using the R-307 fingerprint sensor and is easily available on all markets and online websites.
The Website uses the PHP File, which has a database and records of attendance, we login into the website, and mark attendance and you can collect all the attendance records of each user’s personal details as well as in and out timeing.
All data can also be downloaded and exported in the Excel sheet.
Biometric attendance systems are commonly used system to make attendance like students or company employees. the projects have a wide scope in the modern era of schools, colleges, offices and companies because all attendance data is required.
Required component’s
S.N | Component Name | Quantity |
1 | NodeMCU(ESP8266) | 1 |
2 | R-307 Fingerprint Sensor | 1 |
3 | O.96'' OLED Display | 1 |
4 | Li-ion Battery(18650) | 1 |
5 | On/Off Switch | 1 |
6 | Zero PCB | 1 |
7 | Connecting Wires | 10 |
8 | PVC Box | 1 |
R-307 Fingerprint Sensor
Fingerprint sensors are electronic devices that capture and analyze the unique patterns of ridges and valleys on an individual’s fingertip. They are commonly used for biometric authentication, as fingerprints are unique to each person and can be used as a reliable means of identification.
Features
- Supply voltage:- DC 4.2 ~ 6.0V
- Current:- 50mA
- Image take Speed:- <0.3 seconds
- Storage capacity:- 1000 pieces
- Search time:- <1.0 seconds
- Interface:- UART
- Communication baud rate (UART):- 9600
0.96” OLED Display
OLED displays work by emitting light through organic compounds that are sandwiched between two electrodes. When a voltage is applied to the electrodes, it causes the organic compounds to emit light.
Features
- Display Size:- 2.44 cm (0.96 inch)
- Pixel Colour:- Blue
- Resolution:- 128 x 64 Pixels
- Driving Voltage:- 3.3-5V
- Operating Temperature:- -40~70 Celsius
- Interface Type:- I2C
Setting UP The Website
In this Project, you used the global or local website. You need to have a unique domain name and set up a website.
if you own a website and server you can simply download the biometricattendance.zip file and copy it to the cPanel/Website file manager modify the correct data in db.php and install the PHP file with your website credentials.
in case you don’t wanna money on website management. then you configure your website as local and use your own computer as a server to store the data locally in localHost.
you can download the local server provider Xampp Software.
Install and Download Xampp from the link here:- Download XAMPP
we used to Xampp software to demonstrate the all process. Choose your own operating system and download it. Xampp is available on Windows, Linux and Mac.
once you download the successfully Xampp software and install it.after the successful installation simply download the Biometricattendance.zip file and copy it to the folder C:\xampp\htdocs on your computer or laptop. you place the file where your all website data we stored.
image
Circuit Diagram
Here I used the esp8266(NodeMCU) Microcontroller,0.96” OLED Display, R-307 Fingerprint Sensor.
- 0.96”Oled Display is connected to the I2C Protocol. That’s why it used only 4 pins, SDA, SCL, VCC And GND.and is connected to the nodeMCU Pin D1 and D2.
- R-307 Fingerprint sensor is connected with UART Protocol. is uses 4 wire connections Tx, Rx, VCC And GND.and is connected to the nodeMCU Pin D3 And D4.
Code
In Source Code, you need to make two modifications according to your Wi-Fi network connection and PC IP Address.
- make sure that wifi you use that’s is available in the range near the device.
1 2 |
const char *ssid = "JustDoElectronics"; const char *password = "prateek"; |
- Also, change the IP Address if you are using the Xampp Website domain Name and if you using the global website change it.
1 |
String link = "http://199.168.0.108/biometricattendance/getdata.php"; |
Flowing Libraries
1. OLED GFX Library: Download
2. SSD1306 Library: Download
3. Adafruit Fingerprint Sensor Library: Download
Final Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 |
//Prateek //www.prateeks.in //https://justdoelectronics.com #include <SPI.h> #include <Wire.h> #include <WiFiClient.h> #include <ESP8266WiFi.h> #include <SoftwareSerial.h> #include <ESP8266WebServer.h> #include <ESP8266HTTPClient.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <Adafruit_Fingerprint.h> #define Finger_Rx 0 //D3 #define Finger_Tx 2 //D4 #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 #define OLED_RESET 0 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); SoftwareSerial mySerial(Finger_Rx, Finger_Tx); Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); const char *ssid = "JustDoElectronics"; const char *password = "prateek"; String postData ; String link = "http://192.168.0.108/biometricattendance/getdata.php"; int FingerID = 0; uint8_t id; #define Wifi_start_width 54 #define Wifi_start_height 49 const uint8_t PROGMEM Wifi_start_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x1f,0xf0,0x00,0x00,0x00 ,0x00,0x03,0xff,0xff,0x80,0x00,0x00 ,0x00,0x1f,0xf0,0x1f,0xf0,0x00,0x00 ,0x00,0x7e,0x00,0x00,0xfc,0x00,0x00 ,0x01,0xf0,0x00,0x00,0x1f,0x00,0x00 ,0x03,0xc0,0x00,0x00,0x07,0xc0,0x00 ,0x0f,0x00,0x00,0x00,0x01,0xe0,0x00 ,0x1c,0x00,0x00,0x00,0x00,0x70,0x00 ,0x38,0x00,0x07,0xc0,0x00,0x38,0x00 ,0x70,0x00,0xff,0xfe,0x00,0x1e,0x00 ,0xe0,0x03,0xfc,0x7f,0xc0,0x0e,0x00 ,0x00,0x1f,0x80,0x03,0xf0,0x00,0x00 ,0x00,0x3c,0x00,0x00,0x78,0x00,0x00 ,0x00,0xf0,0x00,0x00,0x1c,0x00,0x00 ,0x01,0xe0,0x00,0x00,0x0c,0x00,0x00 ,0x03,0x80,0x00,0x00,0x00,0x00,0x00 ,0x03,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x3f,0xf8,0x07,0x1e,0x00 ,0x00,0x00,0xff,0xfe,0x1f,0xbf,0x80 ,0x00,0x03,0xe0,0x04,0x7f,0xff,0xc0 ,0x00,0x07,0x80,0x00,0xff,0xff,0xe0 ,0x00,0x0e,0x00,0x00,0xff,0xff,0xe0 ,0x00,0x0c,0x00,0x00,0x7f,0xff,0xc0 ,0x00,0x00,0x00,0x00,0xfe,0x07,0xe0 ,0x00,0x00,0x00,0x03,0xf8,0x03,0xf8 ,0x00,0x00,0x07,0xe7,0xf9,0xf1,0xfc ,0x00,0x00,0x1f,0xe7,0xf1,0xf9,0xfc ,0x00,0x00,0x1f,0xe7,0xf3,0xf9,0xfc ,0x00,0x00,0x3f,0xe7,0xf3,0xf9,0xfc ,0x00,0x00,0x3f,0xe7,0xf1,0xf1,0xfc ,0x00,0x00,0x3f,0xe3,0xf8,0xe3,0xfc ,0x00,0x00,0x3f,0xf3,0xfc,0x07,0xf8 ,0x00,0x00,0x1f,0xf0,0x7f,0x0f,0xc0 ,0x00,0x00,0x0f,0xe0,0x7f,0xff,0xe0 ,0x00,0x00,0x07,0xc0,0xff,0xff,0xe0 ,0x00,0x00,0x00,0x00,0x7f,0xff,0xe0 ,0x00,0x00,0x00,0x00,0x3f,0xff,0x80 ,0x00,0x00,0x00,0x00,0x1f,0xbf,0x00 ,0x00,0x00,0x00,0x00,0x03,0x18,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; #define Wifi_connected_width 63 #define Wifi_connected_height 49 const uint8_t PROGMEM Wifi_connected_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x03,0xff,0xff,0x80,0x00,0x00 ,0x00,0x00,0x3f,0xff,0xff,0xf8,0x00,0x00 ,0x00,0x01,0xff,0xff,0xff,0xff,0x00,0x00 ,0x00,0x0f,0xff,0xff,0xff,0xff,0xe0,0x00 ,0x00,0x3f,0xff,0xc0,0x07,0xff,0xf8,0x00 ,0x00,0xff,0xf8,0x00,0x00,0x3f,0xfe,0x00 ,0x03,0xff,0x80,0x00,0x00,0x03,0xff,0x80 ,0x07,0xfe,0x00,0x00,0x00,0x00,0xff,0xc0 ,0x1f,0xf8,0x00,0x00,0x00,0x00,0x3f,0xf0 ,0x3f,0xe0,0x01,0xff,0xff,0x00,0x0f,0xf8 ,0x7f,0x80,0x0f,0xff,0xff,0xe0,0x03,0xfc ,0xff,0x00,0x7f,0xff,0xff,0xfc,0x01,0xfe ,0xfc,0x01,0xff,0xff,0xff,0xff,0x00,0x7e ,0x78,0x07,0xff,0xc0,0x07,0xff,0xc0,0x3c ,0x00,0x0f,0xfc,0x00,0x00,0x7f,0xe0,0x00 ,0x00,0x1f,0xf0,0x00,0x00,0x1f,0xf0,0x00 ,0x00,0x3f,0xc0,0x00,0x00,0x07,0xf8,0x00 ,0x00,0x7f,0x00,0x01,0x00,0x01,0xfc,0x00 ,0x00,0x7e,0x00,0x7f,0xfc,0x00,0xfc,0x00 ,0x00,0x3c,0x03,0xff,0xff,0x80,0x78,0x00 ,0x00,0x00,0x07,0xff,0xff,0xc0,0x00,0x00 ,0x00,0x00,0x1f,0xff,0xff,0xf0,0x00,0x00 ,0x00,0x00,0x3f,0xf0,0x1f,0xf8,0x00,0x00 ,0x00,0x00,0x3f,0x80,0x03,0xf8,0x00,0x00 ,0x00,0x00,0x3f,0x00,0x01,0xf8,0x00,0x00 ,0x00,0x00,0x1c,0x00,0x00,0x70,0x00,0x00 ,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x1f,0xf0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x3f,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x3f,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x3f,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x3f,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x1f,0xf0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x0f,0xe0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; #define FinPr_start_width 64 #define FinPr_start_height 64 const uint8_t PROGMEM FinPr_start_bits[] = { 0x00,0x00,0x00,0x1f,0xe0,0x00,0x00,0x00 ,0x00,0x00,0x01,0xff,0xfe,0x00,0x00,0x00 ,0x00,0x00,0x03,0xff,0xff,0x80,0x00,0x00 ,0x00,0x00,0x0f,0xc0,0x0f,0xe0,0x00,0x00 ,0x00,0x00,0x1f,0x00,0x01,0xf8,0x00,0x00 ,0x00,0x00,0x3c,0x00,0x00,0x7c,0x00,0x00 ,0x00,0x00,0x78,0x00,0x00,0x3e,0x00,0x00 ,0x00,0x00,0xf0,0x3f,0xf8,0x0f,0x00,0x00 ,0x00,0x01,0xe0,0xff,0xfe,0x07,0x80,0x00 ,0x00,0x03,0xc3,0xff,0xff,0x03,0x80,0x00 ,0x00,0x03,0x87,0xc0,0x07,0xc3,0xc0,0x00 ,0x00,0x07,0x0f,0x00,0x03,0xe1,0xc0,0x00 ,0x00,0x0f,0x0e,0x00,0x00,0xe0,0xe0,0x00 ,0x00,0x0e,0x1c,0x00,0x00,0xf0,0xe0,0x00 ,0x00,0x0c,0x3c,0x1f,0xe0,0x70,0xe0,0x00 ,0x00,0x00,0x38,0x3f,0xf0,0x38,0x70,0x00 ,0x00,0x00,0x78,0x78,0xf8,0x38,0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,0x00,0x07,0xe0,0x78,0x0f,0xc0,0x00 ,0x00,0x00,0x3f,0x81,0xfe,0x07,0xf0,0x00 ,0x00,0x01,0xfe,0x07,0xff,0x01,0xf0,0x00 ,0x00,0x07,0xf8,0x0f,0x87,0x80,0x30,0x00 ,0x00,0x07,0xc0,0x3f,0x03,0xe0,0x00,0x00 ,0x00,0x06,0x00,0xfc,0x01,0xf8,0x00,0x00 ,0x00,0x00,0x03,0xf0,0x00,0x7e,0x00,0x00 ,0x00,0x00,0x0f,0xc0,0x00,0x3f,0x80,0x00 ,0x00,0x00,0x7f,0x00,0xf8,0x0f,0x80,0x00 ,0x00,0x00,0xfc,0x03,0xfe,0x01,0x80,0x00 ,0x00,0x00,0xf0,0x1f,0xff,0x80,0x00,0x00 ,0x00,0x00,0x00,0x7f,0x07,0xe0,0x00,0x00 ,0x00,0x00,0x00,0xfc,0x03,0xf8,0x00,0x00 ,0x00,0x00,0x03,0xf0,0x00,0x78,0x00,0x00 ,0x00,0x00,0x0f,0xc0,0x00,0x18,0x00,0x00 ,0x00,0x00,0x0f,0x01,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x07,0xfe,0x00,0x00,0x00 ,0x00,0x00,0x00,0x1f,0xfe,0x00,0x00,0x00 ,0x00,0x00,0x00,0x1e,0x0e,0x00,0x00,0x00 ,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00 }; #define FinPr_valid_width 64 #define FinPr_valid_height 64 const uint8_t PROGMEM FinPr_valid_bits[] = { 0x00,0x00,0x03,0xfe,0x00,0x00,0x00,0x00 ,0x00,0x00,0x1f,0xff,0xe0,0x00,0x00,0x00 ,0x00,0x00,0x7f,0xff,0xf8,0x00,0x00,0x00 ,0x00,0x00,0xfc,0x00,0xfe,0x00,0x00,0x00 ,0x00,0x03,0xe0,0x00,0x1f,0x00,0x00,0x00 ,0x00,0x07,0xc0,0x00,0x07,0x80,0x00,0x00 ,0x00,0x0f,0x80,0x00,0x03,0xe0,0x00,0x00 ,0x00,0x0e,0x03,0xff,0x01,0xe0,0x00,0x00 ,0x00,0x1c,0x1f,0xff,0xe0,0xf0,0x00,0x00 ,0x00,0x3c,0x3f,0xff,0xf0,0x78,0x00,0x00 ,0x00,0x78,0x7c,0x00,0xf8,0x3c,0x00,0x00 ,0x00,0x70,0xf0,0x00,0x3c,0x1c,0x00,0x00 ,0x00,0xe1,0xe0,0x00,0x1e,0x1c,0x00,0x00 ,0x00,0xe1,0xc0,0x00,0x0f,0x0e,0x00,0x00 ,0x00,0xc3,0x81,0xfc,0x07,0x0e,0x00,0x00 ,0x00,0x03,0x83,0xff,0x07,0x8e,0x00,0x00 ,0x00,0x07,0x07,0x8f,0x83,0x87,0x00,0x00 ,0x00,0x0f,0x0f,0x03,0xc3,0x87,0x00,0x00 ,0x00,0x1e,0x0e,0x01,0xc3,0x87,0x00,0x00 ,0x00,0x3c,0x1c,0x00,0xe1,0x87,0x00,0x00 ,0x00,0xf8,0x1c,0x30,0xe1,0x87,0x00,0x00 ,0x07,0xf0,0x38,0x70,0xe1,0x86,0x00,0x00 ,0x07,0xc0,0x78,0x70,0xe3,0x8e,0x00,0x00 ,0x02,0x00,0xf0,0xf0,0xe3,0x8e,0x00,0x00 ,0x00,0x01,0xe0,0xe0,0xe3,0x8e,0x00,0x00 ,0x00,0x03,0xc1,0xe1,0xc3,0x8e,0x00,0x00 ,0x00,0x0f,0x83,0xc3,0xc3,0x8e,0x00,0x00 ,0x00,0x7f,0x07,0x83,0x83,0x0e,0x00,0x00 ,0x07,0xfc,0x0f,0x07,0x83,0x0e,0x00,0x00 ,0x07,0xf0,0x1e,0x0f,0x03,0x0e,0x00,0x00 ,0x07,0x80,0x7c,0x1e,0x03,0x07,0x00,0x00 ,0x00,0x00,0xf8,0x3c,0x03,0x87,0x80,0x00 ,0x00,0x03,0xf0,0x78,0x03,0x83,0xc0,0x00 ,0x00,0x1f,0xc0,0xf0,0x02,0x00,0x00,0x00 ,0x00,0xff,0x01,0xe1,0xc0,0x0c,0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,0x00,0x00,0x03,0xe0,0xe3,0xff,0xe0,0x00 ,0x00,0x00,0x01,0x80,0x00,0x7f,0x00,0x00 }; #define FinPr_invalid_width 64 #define FinPr_invalid_height 64 const uint8_t PROGMEM FinPr_invalid_bits[] = { 0x00,0x00,0x03,0xfe,0x00,0x00,0x00,0x00 ,0x00,0x00,0x1f,0xff,0xe0,0x00,0x00,0x00 ,0x00,0x00,0x7f,0xff,0xf8,0x00,0x00,0x00 ,0x00,0x00,0xfc,0x00,0xfe,0x00,0x00,0x00 ,0x00,0x03,0xe0,0x00,0x1f,0x00,0x00,0x00 ,0x00,0x07,0xc0,0x00,0x07,0x80,0x00,0x00 ,0x00,0x0f,0x80,0x00,0x03,0xe0,0x00,0x00 ,0x00,0x0e,0x03,0xff,0x01,0xe0,0x00,0x00 ,0x00,0x1c,0x1f,0xff,0xe0,0xf0,0x00,0x00 ,0x00,0x3c,0x3f,0xff,0xf0,0x78,0x00,0x00 ,0x00,0x78,0x7c,0x00,0xf8,0x3c,0x00,0x00 ,0x00,0x70,0xf0,0x00,0x3c,0x1c,0x00,0x00 ,0x00,0xe1,0xe0,0x00,0x1e,0x1c,0x00,0x00 ,0x00,0xe1,0xc0,0x00,0x0f,0x0e,0x00,0x00 ,0x00,0xc3,0x81,0xfc,0x07,0x0e,0x00,0x00 ,0x00,0x03,0x83,0xff,0x07,0x8e,0x00,0x00 ,0x00,0x07,0x07,0x8f,0x83,0x87,0x00,0x00 ,0x00,0x0f,0x0f,0x03,0xc3,0x87,0x00,0x00 ,0x00,0x1e,0x0e,0x01,0xc3,0x87,0x00,0x00 ,0x00,0x3c,0x1c,0x00,0xe1,0x87,0x00,0x00 ,0x00,0xf8,0x1c,0x30,0xe1,0x87,0x00,0x00 ,0x07,0xf0,0x38,0x70,0xe1,0x86,0x00,0x00 ,0x07,0xc0,0x78,0x70,0xe3,0x8e,0x00,0x00 ,0x02,0x00,0xf0,0xf0,0xe3,0x8e,0x00,0x00 ,0x00,0x01,0xe0,0xe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00,0x3f,0xe0 ,0x00,0x07,0xf0,0x13,0xfc,0x00,0x1f,0xe0 ,0x00,0x0f,0xc0,0x79,0xf8,0x08,0x0f,0xe0 ,0x00,0x0f,0x01,0xf9,0xf8,0x1c,0x0f,0xc0 ,0x00,0x00,0x07,0xf1,0xfc,0x3e,0x1f,0xc0 ,0x00,0x00,0x1f,0xc0,0xfe,0x7f,0x3f,0x80 ,0x00,0x00,0x7e,0x00,0xff,0xff,0xff,0x80 ,0x00,0x00,0xfc,0x00,0x7f,0xff,0xff,0x00 ,0x00,0x00,0xf0,0x1f,0x3f,0xff,0xfe,0x00 ,0x00,0x00,0x00,0x7f,0x1f,0xff,0xfc,0x00 ,0x00,0x00,0x01,0xff,0x8f,0xff,0xf8,0x00 ,0x00,0x00,0x03,0xe0,0xe3,0xff,0xe0,0x00 ,0x00,0x00,0x01,0x80,0x00,0x7f,0x00,0x00 }; #define FinPr_failed_width 64 #define FinPr_failed_height 64 const uint8_t PROGMEM FinPr_failed_bits[] = { 0x00,0x00,0x3f,0xe0,0x00,0x00,0x00,0x00 ,0x00,0x01,0xff,0xfe,0x00,0x00,0x00,0x00 ,0x00,0x0f,0xc0,0x1f,0x80,0x00,0x00,0x00 ,0x00,0x1e,0x00,0x03,0xc0,0x00,0x00,0x00 ,0x00,0x78,0x00,0x00,0xf0,0x00,0x00,0x00 ,0x00,0xe0,0x00,0x00,0x38,0x00,0x00,0x00 ,0x01,0xc0,0x00,0x00,0x1c,0x00,0x00,0x00 ,0x03,0x80,0x00,0x00,0x0e,0x00,0x00,0x00 ,0x07,0x00,0x7f,0xe0,0x07,0x00,0x00,0x00 ,0x06,0x01,0xff,0xf8,0x03,0x00,0x00,0x00 ,0x0c,0x03,0xc0,0x3c,0x03,0x80,0x00,0x00 ,0x1c,0x0f,0x00,0x0e,0x01,0x80,0x00,0x00 ,0x18,0x0c,0x00,0x03,0x00,0xc0,0x00,0x00 ,0x18,0x18,0x00,0x01,0x80,0xc0,0x00,0x00 ,0x30,0x38,0x00,0x01,0xc0,0xe0,0x00,0x00 ,0x30,0x30,0x0f,0x00,0xc0,0x60,0x00,0x00 ,0x30,0x30,0x3f,0xc0,0xe0,0x60,0x00,0x00 ,0x70,0x60,0x78,0xe0,0x60,0x60,0x00,0x00 ,0x60,0x60,0x60,0x60,0x60,0x70,0x00,0x00 ,0x60,0x60,0x60,0x60,0x60,0x30,0x00,0x00 ,0x60,0x60,0x60,0x60,0x30,0x30,0x00,0x00 ,0x60,0x60,0x60,0x30,0x30,0x20,0x00,0x00 ,0x60,0x60,0x60,0x30,0x30,0x01,0xe0,0x00 ,0x60,0x60,0x60,0x30,0x30,0x0f,0xfc,0x00 ,0x60,0x60,0x60,0x30,0x30,0x3f,0xff,0x00 ,0x60,0x60,0x60,0x30,0x18,0x78,0x03,0x80 ,0x60,0x60,0x60,0x30,0x1c,0x60,0x01,0x80 ,0x60,0x60,0x30,0x38,0x0c,0xc0,0x00,0xc0 ,0x00,0x60,0x30,0x18,0x00,0xc0,0x00,0xc0 ,0x00,0x60,0x30,0x18,0x00,0xc0,0x00,0xc0 ,0x00,0xe0,0x30,0x0c,0x01,0xc0,0x00,0xe0 ,0x00,0xc0,0x18,0x0e,0x01,0xc0,0x00,0xe0 ,0x60,0xc0,0x18,0x07,0x01,0xc0,0x00,0xe0 ,0x01,0xc0,0x1c,0x03,0x81,0xc0,0x00,0xe0 ,0x01,0x80,0x0c,0x01,0xc1,0xc0,0x00,0xe0 ,0x03,0x80,0x0e,0x00,0xf1,0xc0,0x00,0xe0 ,0x0f,0x00,0x06,0x00,0x01,0xc0,0x00,0xe0 ,0x3e,0x01,0x03,0x00,0x01,0xc0,0x00,0xe0 ,0x30,0x03,0x83,0x80,0x1f,0xff,0xff,0xfe ,0x00,0x03,0x81,0xc0,0x3f,0xff,0xff,0xff ,0x00,0x07,0xc0,0xe0,0x30,0x00,0x00,0x03 ,0x00,0x0e,0xc0,0x78,0x30,0x00,0x00,0x03 ,0x00,0x3c,0x60,0x1e,0x30,0x00,0x00,0x03 ,0x00,0x78,0x70,0x0f,0x30,0x00,0x00,0x03 ,0x03,0xe0,0x38,0x03,0x30,0x00,0x00,0x03 ,0x07,0x80,0x1c,0x00,0x30,0x00,0x00,0x03 ,0xc0,0x00,0x0f,0x00,0x30,0x00,0x00,0x03 ,0xc0,0x00,0x03,0x80,0x30,0x01,0xe0,0x03 ,0x00,0x18,0x01,0xe0,0x30,0x03,0xf0,0x03 ,0x00,0x18,0x00,0x7c,0x30,0x07,0x38,0x03 ,0x00,0x0c,0x00,0x1f,0x30,0x06,0x18,0x03 ,0x18,0x0e,0x00,0x07,0x30,0x06,0x18,0x03 ,0x0c,0x07,0x80,0x00,0x30,0x07,0x38,0x03 ,0x0e,0x03,0xc0,0x00,0x30,0x03,0x30,0x03 ,0x07,0x00,0xf0,0x00,0x30,0x03,0x30,0x03 ,0x03,0x00,0x7e,0x00,0x30,0x03,0x30,0x03 ,0x01,0x80,0x1f,0xc0,0x30,0x03,0x30,0x03 ,0x01,0xc0,0x03,0xe1,0x30,0x07,0xf8,0x03 ,0x00,0xf0,0x00,0x01,0x30,0x03,0xf0,0x03 ,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x03 ,0x00,0x1e,0x00,0x00,0x30,0x00,0x00,0x03 ,0x00,0x07,0xc0,0x00,0x30,0x00,0x00,0x03 ,0x00,0x01,0xff,0x80,0x3f,0xff,0xff,0xff ,0x00,0x00,0x3f,0x80,0x1f,0xff,0xff,0xfe }; #define FinPr_scan_width 64 #define FinPr_scan_height 64 const uint8_t PROGMEM FinPr_scan_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x1f,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x7f,0xff,0x00,0x00,0x00 ,0x00,0x00,0x01,0xfc,0x7f,0xc0,0x00,0x00 ,0x00,0x00,0x03,0xc0,0x03,0xe0,0x00,0x00 ,0x00,0x00,0x07,0x80,0x00,0xf0,0x00,0x00 ,0x00,0x00,0x0e,0x00,0x00,0x3c,0x00,0x00 ,0x00,0x00,0x1c,0x1f,0xfc,0x1c,0x00,0x00 ,0x00,0x00,0x38,0x7f,0xfe,0x0e,0x00,0x00 ,0x00,0x00,0x78,0xf8,0x0f,0x87,0x00,0x00 ,0x00,0x00,0x71,0xe0,0x03,0xc7,0x00,0x00 ,0x00,0x00,0xe3,0x80,0x01,0xc3,0x80,0x00 ,0x00,0x00,0xc3,0x83,0xc0,0xe3,0x80,0x00 ,0x00,0x00,0xc7,0x0f,0xf0,0x71,0x80,0x00 ,0x00,0x00,0x06,0x1f,0xf8,0x71,0xc0,0x00 ,0x00,0x00,0x0e,0x1c,0x3c,0x31,0xc0,0x00 ,0x00,0x00,0x1c,0x38,0x1c,0x31,0xc0,0x00 ,0x00,0x00,0x38,0x70,0x0e,0x39,0xc0,0x00 ,0x00,0x01,0xf0,0x71,0x8e,0x39,0xc0,0x00 ,0x00,0x03,0xe0,0xe1,0x86,0x31,0xc0,0x00 ,0x00,0x03,0x81,0xe3,0x8e,0x31,0x80,0x00 ,0x00,0x00,0x03,0xc3,0x8e,0x33,0x80,0x00 ,0x00,0x00,0x07,0x87,0x0c,0x73,0x80,0x00 ,0x00,0x00,0x1f,0x0e,0x1c,0x73,0x80,0x00 ,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfe ,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff ,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff ,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfe ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x03,0xf0,0x1e,0x3e,0x1c,0x00,0x00 ,0x00,0x03,0x80,0x7c,0x77,0x0f,0x00,0x00 ,0x00,0x00,0x01,0xf0,0xe3,0x07,0xc0,0x00 ,0x00,0x00,0x07,0xe3,0xc3,0x81,0xf0,0x00 ,0x00,0x00,0x3f,0x87,0x81,0xc0,0x60,0x00 ,0x00,0x01,0xfc,0x1f,0x00,0xf0,0x00,0x00 ,0x00,0x01,0xe0,0x3c,0x00,0x7c,0x00,0x00 ,0x00,0x00,0x00,0xf8,0x78,0x1f,0x00,0x00 ,0x00,0x00,0x07,0xe0,0xfc,0x0f,0xc0,0x00 ,0x00,0x00,0x3f,0x83,0xef,0x03,0xc0,0x00 ,0x00,0x00,0xfc,0x0f,0x87,0x80,0x00,0x00 ,0x00,0x00,0x70,0x1f,0x03,0xe0,0x00,0x00 ,0x00,0x00,0x00,0x7c,0x00,0xf8,0x00,0x00 ,0x00,0x00,0x01,0xf0,0x00,0x3e,0x00,0x00 ,0x00,0x00,0x0f,0xc0,0xf8,0x0f,0x00,0x00 ,0x00,0x00,0x1f,0x03,0xfe,0x02,0x00,0x00 ,0x00,0x00,0x0c,0x0f,0x8f,0x80,0x00,0x00 ,0x00,0x00,0x00,0x3f,0x03,0xe0,0x00,0x00 ,0x00,0x00,0x00,0xf8,0x00,0xf0,0x00,0x00 ,0x00,0x00,0x01,0xe0,0x00,0x30,0x00,0x00 ,0x00,0x00,0x01,0xc0,0xf8,0x00,0x00,0x00 ,0x00,0x00,0x00,0x07,0xfe,0x00,0x00,0x00 ,0x00,0x00,0x00,0x0f,0x8e,0x00,0x00,0x00 ,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; void setup() { Serial.begin(115200); if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64 Serial.println(F("SSD1306 allocation failed")); for(;;); // Don't proceed, loop forever } display.display(); delay(2000); // Pause for 2 seconds display.clearDisplay(); connectToWiFi(); finger.begin(57600); Serial.println("\n\nAdafruit finger detect test"); if (finger.verifyPassword()) { Serial.println("Found fingerprint sensor!"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); } else { Serial.println("Did not find fingerprint sensor :("); display.clearDisplay(); display.drawBitmap( 32, 0, FinPr_failed_bits, FinPr_failed_width, FinPr_failed_height, WHITE); display.display(); while (1) { delay(1); } } finger.getTemplateCount(); Serial.print("Sensor contains "); Serial.print(finger.templateCount); Serial.println(" templates"); Serial.println("Waiting for valid finger..."); } void loop() { //check if there's a connection to WiFi or not if(WiFi.status() != WL_CONNECTED){ connectToWiFi(); } FingerID = getFingerprintID(); delay(50); DisplayFingerprintID(); ChecktoAddID(); ChecktoDeleteID(); } void DisplayFingerprintID(){ if (FingerID > 0){ display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); SendFingerprintID( FingerID ); } else if (FingerID == 0){ display.clearDisplay(); display.drawBitmap( 32, 0, FinPr_start_bits, FinPr_start_width, FinPr_start_height, WHITE); display.display(); } else if (FingerID == -1){ display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_invalid_bits, FinPr_invalid_width, FinPr_invalid_height, WHITE); display.display(); } //--------------------------------------------- //Didn't find the scanner or there an error else if (FingerID == -2){ display.clearDisplay(); display.drawBitmap( 32, 0, FinPr_failed_bits, FinPr_failed_width, FinPr_failed_height, WHITE); display.display(); } } void SendFingerprintID( int finger ){ WiFiClient client; HTTPClient http; postData = "FingerID=" + String(finger); http.begin(client,link); http.addHeader("Content-Type", "application/x-www-form-urlencoded"); int httpCode = http.POST(postData); //Send the request String payload = http.getString(); //Get the response payload Serial.println(httpCode); //Print HTTP return code Serial.println(payload); //Print request response payload Serial.println(postData); //Post Data Serial.println(finger); //Print fingerprint ID if (payload.substring(0, 5) == "login") { String user_name = payload.substring(5); // Serial.println(user_name); display.clearDisplay(); display.setTextSize(2); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(15,0); // Start at top-left corner display.print(F("Welcome")); display.setCursor(0,20); display.print(user_name); display.display(); } else if (payload.substring(0, 6) == "logout") { String user_name = payload.substring(6); // Serial.println(user_name); display.clearDisplay(); display.setTextSize(2); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(10,0); // Start at top-left corner display.print(F("Good Bye")); display.setCursor(0,20); display.print(user_name); display.display(); } delay(1000); postData = ""; http.end(); //Close connection } //********************Get the Fingerprint ID****************** int getFingerprintID() { uint8_t p = finger.getImage(); switch (p) { case FINGERPRINT_OK: //Serial.println("Image taken"); break; case FINGERPRINT_NOFINGER: //Serial.println("No finger detected"); return 0; case FINGERPRINT_PACKETRECIEVEERR: //Serial.println("Communication error"); return -2; case FINGERPRINT_IMAGEFAIL: //Serial.println("Imaging error"); return -2; default: //Serial.println("Unknown error"); return -2; } // OK success! p = finger.image2Tz(); switch (p) { case FINGERPRINT_OK: //Serial.println("Image converted"); break; case FINGERPRINT_IMAGEMESS: //Serial.println("Image too messy"); return -1; case FINGERPRINT_PACKETRECIEVEERR: //Serial.println("Communication error"); return -2; case FINGERPRINT_FEATUREFAIL: //Serial.println("Could not find fingerprint features"); return -2; case FINGERPRINT_INVALIDIMAGE: //Serial.println("Could not find fingerprint features"); return -2; default: //Serial.println("Unknown error"); return -2; } // OK converted! p = finger.fingerFastSearch(); if (p == FINGERPRINT_OK) { //Serial.println("Found a print match!"); } else if (p == FINGERPRINT_PACKETRECIEVEERR) { //Serial.println("Communication error"); return -2; } else if (p == FINGERPRINT_NOTFOUND) { //Serial.println("Did not find a match"); return -1; } else { //Serial.println("Unknown error"); return -2; } // found a match! //Serial.print("Found ID #"); Serial.print(finger.fingerID); //Serial.print(" with confidence of "); Serial.println(finger.confidence); return finger.fingerID; } //******************Check if there a Fingerprint ID to delete****************** void ChecktoDeleteID(){ WiFiClient client; HTTPClient http; //Declare object of class HTTPClient //Post Data postData = "DeleteID=check"; // Add the Fingerprint ID to the Post array in order to send it // Post methode http.begin(client,link); //initiate HTTP request, put your Website URL or Your Computer IP http.addHeader("Content-Type", "application/x-www-form-urlencoded"); //Specify content-type header int httpCode = http.POST(postData); //Send the request String payload = http.getString(); //Get the response payload if (payload.substring(0, 6) == "del-id") { String del_id = payload.substring(6); Serial.println(del_id); deleteFingerprint( del_id.toInt() ); } http.end(); //Close connection } //******************Delete Finpgerprint ID***************** uint8_t deleteFingerprint( int id) { uint8_t p = -1; p = finger.deleteModel(id); if (p == FINGERPRINT_OK) { //Serial.println("Deleted!"); display.clearDisplay(); display.setTextSize(2); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Deleted!\n")); display.display(); } else if (p == FINGERPRINT_PACKETRECIEVEERR) { //Serial.println("Communication error"); display.clearDisplay(); display.setTextSize(1); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Communication error!\n")); display.display(); return p; } else if (p == FINGERPRINT_BADLOCATION) { //Serial.println("Could not delete in that location"); display.clearDisplay(); display.setTextSize(1); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Could not delete in that location!\n")); display.display(); return p; } else if (p == FINGERPRINT_FLASHERR) { //Serial.println("Error writing to flash"); display.clearDisplay(); display.setTextSize(1); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Error writing to flash!\n")); display.display(); return p; } else { //Serial.print("Unknown error: 0x"); Serial.println(p, HEX); display.clearDisplay(); display.setTextSize(2); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Unknown error:\n")); display.display(); return p; } } //******************Check if there a Fingerprint ID to add****************** void ChecktoAddID(){ WiFiClient client; HTTPClient http; //Declare object of class HTTPClient //Post Data postData = "Get_Fingerid=get_id"; // Add the Fingerprint ID to the Post array in order to send it // Post methode http.begin(client,link); //initiate HTTP request, put your Website URL or Your Computer IP http.addHeader("Content-Type", "application/x-www-form-urlencoded"); //Specify content-type header int httpCode = http.POST(postData); //Send the request String payload = http.getString(); //Get the response payload if (payload.substring(0, 6) == "add-id") { String add_id = payload.substring(6); Serial.println(add_id); id = add_id.toInt(); getFingerprintEnroll(); } http.end(); //Close connection } //******************Enroll a Finpgerprint ID***************** uint8_t getFingerprintEnroll() { int p = -1; display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_scan_bits, FinPr_scan_width, FinPr_scan_height, WHITE); display.display(); while (p != FINGERPRINT_OK) { p = finger.getImage(); switch (p) { case FINGERPRINT_OK: //Serial.println("Image taken"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); break; case FINGERPRINT_NOFINGER: //Serial.println("."); display.setTextSize(1); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("scanning")); display.display(); break; case FINGERPRINT_PACKETRECIEVEERR: display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_invalid_bits, FinPr_invalid_width, FinPr_invalid_height, WHITE); display.display(); break; case FINGERPRINT_IMAGEFAIL: Serial.println("Imaging error"); break; default: Serial.println("Unknown error"); break; } } // OK success! p = finger.image2Tz(1); switch (p) { case FINGERPRINT_OK: display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); break; case FINGERPRINT_IMAGEMESS: display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_invalid_bits, FinPr_invalid_width, FinPr_invalid_height, WHITE); display.display(); 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; } display.clearDisplay(); display.setTextSize(2); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("Remove")); display.setCursor(0,20); display.print(F("finger")); display.display(); //Serial.println("Remove finger"); delay(2000); p = 0; while (p != FINGERPRINT_NOFINGER) { p = finger.getImage(); } Serial.print("ID "); Serial.println(id); p = -1; display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_scan_bits, FinPr_scan_width, FinPr_scan_height, WHITE); display.display(); while (p != FINGERPRINT_OK) { p = finger.getImage(); switch (p) { case FINGERPRINT_OK: //Serial.println("Image taken"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); break; case FINGERPRINT_NOFINGER: //Serial.println("."); display.setTextSize(1); // Normal 2:2 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(F("scanning")); display.display(); break; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); break; case FINGERPRINT_IMAGEFAIL: Serial.println("Imaging error"); break; default: Serial.println("Unknown error"); break; } } // OK success! p = finger.image2Tz(2); switch (p) { case FINGERPRINT_OK: //Serial.println("Image converted"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); 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!"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); } 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!"); display.clearDisplay(); display.drawBitmap( 34, 0, FinPr_valid_bits, FinPr_valid_width, FinPr_valid_height, WHITE); display.display(); confirmAdding(); } 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; } } //******************Check if there a Fingerprint ID to add****************** void confirmAdding(){ WiFiClient client; HTTPClient http; //Declare object of class HTTPClient //Post Data postData = "confirm_id=" + String(id); // Add the Fingerprint ID to the Post array in order to send it // Post methode http.begin(client,link); //initiate HTTP request, put your Website URL or Your Computer IP http.addHeader("Content-Type", "application/x-www-form-urlencoded"); //Specify content-type header int httpCode = http.POST(postData); //Send the request String payload = http.getString(); //Get the response payload display.clearDisplay(); display.setTextSize(1.5); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0,0); // Start at top-left corner display.print(payload); display.display(); delay(1000); Serial.println(payload); http.end(); //Close connection } //********************connect to the WiFi****************** void connectToWiFi(){ WiFi.mode(WIFI_OFF); //Prevents reconnection issue (taking too long to connect) delay(1000); WiFi.mode(WIFI_STA); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); display.clearDisplay(); display.setTextSize(1); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(0, 0); // Start at top-left corner display.print(F("Connecting to \n")); display.setCursor(0, 50); display.setTextSize(2); display.print(ssid); display.drawBitmap( 73, 10, Wifi_start_bits, Wifi_start_width, Wifi_start_height, WHITE); display.display(); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("Connected"); display.clearDisplay(); display.setTextSize(2); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(8, 0); // Start at top-left corner display.print(F("Connected \n")); display.drawBitmap( 33, 15, Wifi_connected_bits, Wifi_connected_width, Wifi_connected_height, WHITE); display.display(); Serial.print("IP address: "); Serial.println(WiFi.localIP()); //IP address assigned to your ESP } |
Once the program is successfully uploaded to the nodeMCU(ESP8266) microcontroller. it will boot up and OLED display the wifi connectivity network if the password is correct then is displayed as connected.
once wifi connected you start the registration process of the user on the website using the link:- http://localhost/biometricattendance/ManageUsers.php
if you check the video tutorial then you get more about how they used the system we try to explain all processes.
Authentication Of Users
when the resister is completed the system is ready to use it. you can start scanning and marking the attendance and the OLED display the welcome message as follows:
image
Finally, you can access the smart attendance data of the students on the website by simply selecting data and you easily download the data in Excel sheet format.
Real-Time Install Photos
Video
you can follow the video tutorial then you understand more about the Smart Attendance System using a Fingerprint Sensor this video helps to how you do all processes step by step.
Concussion
we used the smart attendance system and is really working perfectly but one disadvantage if you use local server software. that time is connected to the proper Wi-Fi network and also on the Xampp Software.
Thanks for the time to read the article we will try to explain step by step if you have any problem related to the project plz comment below.