Cov txheej txheem:

Smart Security System: 10 Kauj Ruam
Smart Security System: 10 Kauj Ruam

Video: Smart Security System: 10 Kauj Ruam

Video: Smart Security System: 10 Kauj Ruam
Video: Samsung One UI – обзор всех фишек 2024, Hlis ntuj nqeg
Anonim
Ntse Kev Ruaj Ntseg
Ntse Kev Ruaj Ntseg

Koj puas tau xav tias tsis nyab xeeb hauv koj lub tsev, lossis koj puas xav tiv thaiv koj lub tuam txhab? Tej zaum koj tuaj yeem tsim kev ruaj ntseg kom tag nrho cov teeb meem no raug daws. Hauv cov lus qhia no kuv qhia koj li cas. Kuv tau teeb tsa txhua ntu ntawm cov ntoo ntoo rau lub hom phiaj ua qauv qhia, koj yuav tsum txhim kho nws qhov koj xav tau (ntu arduino ntawm phab ntsa uas koj tuaj yeem mus txog nws, lub rooj tsavxwm tseem ceeb nyob qhov twg ntawm qhov ncaj qha, lub suab thiab lub teeb uas koj nyob. xav tau nws thiab cov ntsuas hauv chav uas koj xav tiv thaiv.

Txhawm rau ua raws cov lus qhia no koj yuav tsum muaj kev paub txog:

  • raspberry pib
  • arduino
  • git ua
  • mysql ua

Thiab yog tias koj xav hloov cov cai:

  • nab hab sej
  • arduino
  • html/css

Kauj Ruam 1: BOM (yam koj xav tau)

Hauv cov npe no yog txhua yam koj xav tau los ua kom muaj kev nyab xeeb, feem ntau ntawm txhua yam koj tuaj yeem yuav ntawm aliexpress tab sis qee yam xws li adafruit pn532n thiab pi koj yuav tsum yuav lwm qhov. Qhov tseem ceeb nyab xeeb koj tuaj yeem yuav hauv khw muag khoom kho vajtse hauv ib cheeb tsam.

Kauj ruam 2: Schematic

Schematic
Schematic
Mount Txhua Yam Hauv Qhov Ntsuas Zoo
Mount Txhua Yam Hauv Qhov Ntsuas Zoo

Kuv lasercutted ib qho uas kuv tau teeb tsa txhua yam nyob rau sab saum toj los ntawm kev khawb 3mm qhov thiab siv cov nylon spacers, kuv tau hlais ntau qhov hauv qhov tseem ceeb nyab xeeb thiab siv cable grommets los tiv thaiv cov hlua los ntawm cov ntug ntse.

Kauj Ruam 7: Txhim Kho Arduino, Rfid Reader thiab Lcd

Mounting Arduino, Rfid Reader thiab Lcd
Mounting Arduino, Rfid Reader thiab Lcd
Mounting Arduino, Rfid Reader thiab Lcd
Mounting Arduino, Rfid Reader thiab Lcd
Mounting Arduino, Rfid Reader thiab Lcd
Mounting Arduino, Rfid Reader thiab Lcd

Rfid nyeem ntawv zoo li qhia hauv daim duab, siv m3 txiv ntoo ua qhov sib txawv nruab nrab ntawm lub hau thiab tus nyeem ntawv, ua tib yam rau lub lcd (xyuas kom tseeb tias nws yog txoj hauv kev nce).

Mount arduino ntawm qhov chaw koj xav tau, siv jumper cables lossis ua ib lub cable nrog cov dav dav kom txuas tau txhua yam.

Kauj ruam 8: Teeb tsa Pi

Sau cov duab raspbian tshiab rau daim npav SD, khau raj pi, txuas dua ssh (username = pi, password = raspberry, hloov nws asap)

ua:

sudo apt install -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3

tam sim no peb yuav qhib qhov chaw ib puag ncig Virtual

python3 -m pip nruab -hloov kho pip setuptools log virtualenv

mkdir project1 && cd project1 python3 -m venv --system-site-packages env source env/bin/qhib cov nab npawb -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib

Kauj Ruam 9: Tsim lub Database

Tsim lub Database
Tsim lub Database

tsim 3 database-users: project1-web, project1-sensor thiab project1-admin nrog cov cim tshwj xeeb

tsim cov ntaub ntawv hu ua project1

muab txhua txoj cai rau tus thawj tswj hwm thiab xaiv, INSERT, Hloov kho thiab tshem tawm rau lwm 2 tus neeg siv

ntshuam cov ntaub ntawv sql mus rau pi

Kauj ruam 10: Uploading Code

pi pib

git clone

sau koj cov ntaub ntawv pov thawj cov ntaub ntawv pov thawj hauv tus lej (hauv sensor.py ntawm kab 47 thiab 64, thiab hauv web.py ntawm kab 41)

ntxiv tus neeg siv lub vev xaib uas tsis tuaj yeem tshem tawm: hauv qab ntawm txoj cai muaj kab hais tawm: adduser (hauv paus, koj tus password). Sau koj tus password uas koj xaiv thiab khiav cov cai tom qab tawm lus kab thiab tshem tus password

arduino

upload cov cai rau koj arduino

Pom zoo: