Cov txheej txheem:

Virtual Peephole: 4 Kauj Ruam (nrog Duab)
Virtual Peephole: 4 Kauj Ruam (nrog Duab)

Video: Virtual Peephole: 4 Kauj Ruam (nrog Duab)

Video: Virtual Peephole: 4 Kauj Ruam (nrog Duab)
Video: Цифровой глазок EZVIZ CP4 - Подключенный видеотелефон - 1080P - Приложение Ezviz - Android и iOS 2024, Kaum ib hlis
Anonim
Image
Image

Muaj kwv yees li 770 lab lub koob yees duab keb soj ntsuam thoob ntiaj teb. Qee tus ntawm lawv tseem muaj lawv tus password tsis raug, ua rau lawv nkag tau yooj yim, los ntawm txhua tus neeg uas muaj kev siv internet.

Qhov peephole virtual no yog lub cuab yeej los saib qee lub koob yees duab uas tsis muaj kev ruaj ntseg. Txhua lub sijhawm qhib qhov peephole, muaj lub koob yees duab sib txawv.

Khoom siv

  • 1 Arduino Micro Cov
  • 1 Photo resistor
  • 1 Raspberry Pi 3 Qauv B.
  • 1 Raspberry Pi Screen
  • 1 Ntoo Ntoo
  • 1 Qhov Rooj Qhov Muag
  • Laum
  • Ntsia Hlau

Kauj Ruam 1: Raspberry Pi thiab Arduino teeb tsa

Raspberry Pi thiab Arduino Teeb
Raspberry Pi thiab Arduino Teeb

Qhov peephole virtual yog ua los ntawm 2 qhov sib txawv: Raspberry Pi (nrog lub vijtsam me me) thiab Arduino Micro. Raspberry Pi txuas nrog internet thiab nthuav tawm lub vev xaib, uas qhia pom ib lub koob yees duab tsis pub siv. Nws muaj lub teeb pom kev sab hauv lub qhov peephole, txhawm rau txheeb xyuas yog tias nws qhib lossis kaw. Thaum twg qhov peephole raug kaw, lub teeb liab xa mus rau Raspberry Pi (ntawm Arduino Micro), thiab lub vev xaib hloov mus rau lwm lub koob yees duab pub. Cov koob yees duab cov ntaub ntawv kuv siv rau txoj haujlwm no tau muab tshem tawm los ntawm Insecam, lub vev xaib uas sau npe ntau dua 73, 000 lub koob yees duab tsis muaj kev ruaj ntseg.

Lub vev xaib los tso saib

Txog kuv qhov peephole virtual, Kuv tau tsim lub vev xaib nrog cov ntaub ntawv kuv khaws los ntawm kev tsis nyab xeeb. Koj tuaj yeem tsim koj tus kheej lub vev xaib tau zoo, tab sis qhov no tsis yog qhov ua tau ntawm qhov tsis tuaj yeem ua. Yog tias koj tsis xav zoo li tsim koj tus kheej lub vev xaib, koj tuaj yeem siv qhov txuas no (nws hloov pauv webcam txhua lub sijhawm qhov chaw bar raug nias; tom qab ntawv peb yuav ua tus yuam sij ntawd los ntawm arduino), lossis pom qhov chaws.

Teeb tsa Raspberry pi

  1. Xyuas kom koj Raspberry Pi ua haujlwm thiab teeb tsa (saib phau ntawv qhia no yog tias koj tshiab rau raspberry pi)
  2. Nqa lub vijtsam LCD mus rau Raspberry Pi
  3. Kom raspberry pi qhib lub vev xaib thaum pib

Teeb tsa Arduino

Nco ntsoov: txhawm rau ua txoj haujlwm no, koj pawg thawj coj Arduino yuav tsum txhawb nqa lub tsev qiv ntawv keyboard Raws li tau hais hauv lub tsev qiv ntawv nplooj ntawv:

Cov qauv txhawb nqa yog 32u4 thiab SAMD raws cov laug cam (Leonardo, Esplora, Zero, Due thiab MKR Family)

  1. Nqa koj lub teeb sensor mus rau Arduino
  2. Tshaj tawm cov cai ntawm Arduino. Txoj cai yuav xub ntsuas ntsuas rau 5 vib nas this (thaum lub sijhawm min thiab tus nqi siab tshaj plaws ntawm tus kws yees duab yuav tau sau npe), thiab tom qab ntawd xa "qhov chaw" teeb liab tseem ceeb thaum twg lub teeb pom kev qis dua hauv qab qhov muag (lub ntsiab lus lub qhov peephole raug kaw).

yav tom ntejMillis = 0

// vim tias lub teeb ib txwm sib txawv, peb yuav ntsuas tus yees duab ntawm txhua lub khau raj. ntev calibrationtime = 5000; ntev startMillis = 0; // tus nqi siab tshaj plaws rau kev ntsuas analog yog 1024 int sensorMin = 1024; int sensorMax = 0; int nruab nrab = 0; int pib = 5; bool lastState = tseeb; bool isClosed = tseeb; teeb tsa tsis muaj dab tsi () {Serial.begin (9600); // qhib qhov chaw nres nkoj txuas Keyboard.begin (); // pib lub keyboard tsev qiv ntawv startMillis = millis (); // pib lub txee} void loop () {// ruaj khov nyeem ntawv hauv thawj 5 vib nas this // tom qab ntawd, txheeb xyuas qhov sib txawv ntawm qhov ruaj khov. unsigned ntev currentMillis = millis (); // teeb tsa millis raws li lub sijhawm tam sim no int sensorValue = analogRead (A0); // nyeem lub sensor yog (currentMillis-startMillis <calibrationtime) {// tsuav peb nyob hauv lub sijhawm ntsuas ntsuas // thaum lub sijhawm ntsuas no, qhib thiab kaw lub peephole kom ntsuas nws. int elapsedtime = currentMillis - startMillis; Serial.println (sijhawm dhau los); Serial.println (sensorMin); Serial.println (sensorMax); yog (sensorValue sensorMax) {sensorMax = sensorValue; nruab nrab = (sensorMin + sensorMax)/2; } ncua (100); // ncua} ntxiv {// yog tias qhov ntsuas tau ua tiav yog (sensorValue> nruab nrab + qhov pib) {// kuaj xyuas yog tias qhov peephole qhib lossis kaw isClosed = cuav; yog (lastState! = isClosed) {}} else {isClosed = true; yog (lastState! = isClosed) {Keyboard.print (""); // xa lub cim tseem ceeb yog lub peephole qhib}} lastState = isClosed; ncua (100); }}

Kauj ruam 2: Teeb lub thawv

Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
Teeb lub thawv
  • Laum ib lub qhov rooj ntawm lub qhov rooj, kom haum rau cov duab (qhov no yuav kuaj xyuas yog tias koj lub peephole tau qhib lossis kaw thiab tom qab ntawd ua rau lub webcam hloov pauv).
  • Laum ib lub qhov rau hauv lub thawv kom koj tuaj yeem haum qhov rooj qhov rooj
  • Nyob rau hauv pem hauv ntej ntawm lub qhov muag qhov rooj, ruaj ntseg raspberry pi nrog lub vijtsam (Kuv siv velcro)
  • Hlau arduino:

    • Hlau tus photosensor mus rau arduino
    • Muab USB cable nruab nrab ntawm Rpi thiab Arduino. Arduino yuav ua zoo li cov keyboard thiab xa cov cim tseem ceeb rau raspberry pi.

Kauj Ruam 3: Pib Txog Qhov Peephole Virtual

Image
Image
Pib Pib Lub Peephole Virtual
Pib Pib Lub Peephole Virtual

Thaum koj tau muab txhua yam tso rau hauv lub thawv, tam sim no koj tau npaj los khiav koj lub peephole virtual.

  • Muab qhov peephole virtual tso rau ntawm phab ntsa
  • Txuas Rapsberry pi rau lub zog
  • Tam sim no koj yuav muaj 5 vib nas this los ntsuas cov duab nyob hauv lub qhov muag qhov rooj, los ntawm kev qhib thiab kaw nws ntau zaus.

Lub peephole virtual yuav tsum tam sim no ua haujlwm!

Txaus siab rau!

Kauj ruam 4:

Raspberry Pi Kev Sib Tw 2020
Raspberry Pi Kev Sib Tw 2020
Raspberry Pi Kev Sib Tw 2020
Raspberry Pi Kev Sib Tw 2020

Khiav Tawm Hauv Kev Sib Tw Raspberry Pi 2020

Pom zoo: