Cov txheej txheem:

Lub Koob Yees Duab Tswj Chaw Taws Teeb los ntawm Raspberry Pi: 5 Kauj Ruam (nrog Duab)
Lub Koob Yees Duab Tswj Chaw Taws Teeb los ntawm Raspberry Pi: 5 Kauj Ruam (nrog Duab)

Video: Lub Koob Yees Duab Tswj Chaw Taws Teeb los ntawm Raspberry Pi: 5 Kauj Ruam (nrog Duab)

Video: Lub Koob Yees Duab Tswj Chaw Taws Teeb los ntawm Raspberry Pi: 5 Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Lub Xya hli ntuj
Anonim
Image
Image

Phau ntawv qhia no yuav qhia paub yuav ua li cas:

1. Muab lub koob yees duab tso rau Lub Vev Xaib Hauv Zos (rau kev pom kev deb ntawm Computer lossis Xov Tooj)

2. Tswj lub koob yees duab pom kev (siv lub cev muaj zog iav)

Daim ntawv teev npe rau qhov project:

1. Tsav nrog iav

2. Raspberry Pi B

3. H-choj

4. USB lub koob yees duab (Logitech)

Kauj Ruam 1: Muab Lub Koob Yees Duab Tso Rau Hauv Lub Vev Xaib Hauv Zos (siv "kev txav")

$ sudo apt-tau hloov tshiab

$ sudo apt-tau nruab tsab ntawv tsa suab

$ sudo apt-tau nruab libv4l-0

$ sudo apt-tau nruab uvccapture

$ gedit/etc/default/tsab ntawv tsa suab

hloov "start_motion_daemon yog" (los ntawm "tsis")

$ gedit /etc/motion/motion.conf

hloov daemon rau (los ntawm "tawm")

stream_localhost tawm (los ntawm "on")

framerate 100 (los ntawm "2")

stream_maxrate 10 (los ntawm "1")

$ kev pab txhawb nqa pib

$ pib tawm suab

Nyob rau hauv rooj plaub kom nres lub koob yees duab:

$ tsab ntawv tsa suab nres

$ kev pab cuam nres

Qhib lub web browser, chaw nyob nkag mus: 192.168.1.71:8081 -> lub koob yees duab duab yuav tsum yog ntawm lub web browser (ceeb toom: 192.168.1.71 yog Raspberry IP chaw nyob)

Kauj ruam 2: Ua Local Server

$ sudo apt-tau nruab apache2 php5 libapache2-mod-php5

Yog tias txhua yam zoo, lub vev xaib hauv cheeb tsam yuav tso tawm hauv Web Browser tom qab nkag mus chaw nyob 192.168.1.71/index.html

Qhov no "index.html" tau txais kev cawmdim hauv/var/www/html/

Kauj Ruam 3: Muab "lub koob yees duab" thiab "IO Control" rau Local Server

Ntawm theem 1, lub koob yees duab duab nyob ntawm kwj (192.168.1.71:8081)

Ntawm theem 2, lub vev xaib hauv zos tau ua.

Yog li nplooj ntawv php tau ua hauv Local server kom thauj lub koob yees duab ntws, lub sijhawm no nplooj ntawv php no tseem muaj 2 khawm (tig sab laug/sab xis) los tswj lub koob yees duab

Kom yooj yim, tag nrho txoj haujlwm tau txuag ntawm qhov txuas no (google qhia tawm)

Nqa cov ntaub ntawv saum toj no, rho tawm nws, tom qab ntawd khaws tag nrho cov ntaub ntawv thiab nplaub tshev rau hauv/var/www/html/

Kauj ruam 4: Nruab Kho Vajtse

Nruab Kho Vajtse
Nruab Kho Vajtse
Nruab Kho Vajtse
Nruab Kho Vajtse

GPIO ntawm Raspberry (GPIO_0, GPIO_7, GND) yog siv los tswj Tsav Tsav (H-Choj L298N)

Ua lub koob yees duab puag, teeb tsa lawv txhua tus ua ke raws li daim duab.

Kauj Ruam 5: Xeem Nws

Kuaj Nws!
Kuaj Nws!

Qhib web browser, chaw nyob nkag 192.168.1.71/camera.php

Tam sim no peb tuaj yeem sim nws, thiab pom qhov tshwm sim

Pom zoo: