Giter Site home page Giter Site logo

kslhacks / 2fa_doorlock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesearle/2fa_doorlock

2.0 1.0 1.0 6.31 MB

:lock: 2FA physical locking system using Raspberry Pi with mini camera and microphone, sending photo and audio to the Microsoft Cognitive Services APIs to do identity detection

Python 99.44% JavaScript 0.56%

2fa_doorlock's Introduction

IoT 2-Factor-Auth Door Lock (Facial + Voice Recognition)

2FA physical locking system using RaspberryPi3 with RP Camera V2.1 and microphone.

Photos and voice recordings are taken from the device, stored, and verified using the Microsoft Cognitive Services APIs to do identity detection.

There are two main parts to this project:

  1. main.py
    1. Face Recognition
    2. Voice Recognition
  2. Hardware Setup
    1. RaspBerryPi 3 (RP2 will also work, keep in mind there is no built inwifi)
    2. Resistors = 220(Ohm)
    3. Pushbutton
    4. (2) Red LEDs, (2) Green LEDs
    5. RaspberryPi2 Camera V2.1
    6. Digital microphone (USB 7.1 channel audio + Microphone)

Audio

  • Great blog here: Recording on Pi
  • Useful commands:
    • alsamixer - open up visual mixer
    • sudo alsactl store 1 - store settings into a variable
    • arecord -l - view all available recording devices
    • arecord - for more help and options
    • arecord –f S16 –r 16000 –D plughw:1 –d 5 ./voice_record.wav - record with specific settings
    • aplay ./voice_record.wav - play back audio on pi

Picture

  • Enable the camera device
    1. sudo raspi-config
    2. Select ‘5 Enable Camera’
    3. Select ‘Yes’
    4. Select ‘Finish’ on main menu
  • To take a picture.. (RaspberryPi Camera V2.1)
    • raspistill –o output.jpg –q 40

Circuit Diagram

Python: As shown in diagram below Node: Button is connected to GPIO pin 4 instead of GPIO pin 23 (what is shown in diagram)

FritzingDiagram

Logic Flow Diagram

LogicFlow

2fa_doorlock's People

Contributors

jamesearle avatar kevinleung23 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

anoukshauu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.