Cov txheej txheem:

Zombie Tshawb Pom Kev Ntse Ruaj Ntseg Owl (Kawm Paub tob tob): 10 Cov Kauj Ruam (nrog Duab)
Zombie Tshawb Pom Kev Ntse Ruaj Ntseg Owl (Kawm Paub tob tob): 10 Cov Kauj Ruam (nrog Duab)

Video: Zombie Tshawb Pom Kev Ntse Ruaj Ntseg Owl (Kawm Paub tob tob): 10 Cov Kauj Ruam (nrog Duab)

Video: Zombie Tshawb Pom Kev Ntse Ruaj Ntseg Owl (Kawm Paub tob tob): 10 Cov Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim

Nyob zoo txhua tus, zoo siab T3chFlicks! Hauv qhov kev qhia Xus no, peb yuav qhia koj yuav ua li cas peb tso lub super spooky twist ntawm tsev neeg hauv ntiaj teb qub: lub koob yees duab ruaj ntseg.

Yuav ua li cas?! Peb tau tsim lub zeem muag hmo ntuj uas siv cov duab ua kom taug qab tib neeg. Auj, thiab nws hoots, ib yam li qhov tiag!

Peb tau zoo siab heev txog txoj haujlwm no thiab peb tau tos ua nws txij li Raspberry Pi 4 tshiab poob. Nws tau txais 4GB RAM, uas qhib lub qhov rooj mus rau qhov muaj peev xwm txaus siab tiag tiag, suav nrog ua qee cov duab ua nrog cov qauv kev kawm tob hauv lub sijhawm.

Yog tias koj xav khaws lub qhov muag kom ze rau zombies ntawm Xus, lossis tsuas yog tshawb xyuas koj lub vaj lub caij so ntawm lub xyoo puag ncig, qhov no yog qhov rau koj. Kev nyab xeeb tsis tas yuav tsum tau ua kom muaj txiaj ntsig!

Khoom siv

Rau qhov kev tsim no, koj yuav xav tau:

  • Raspberry Pi 4 (4GB Ram) Amazon
  • Hmo Pom Lub Koob Yees Duab Amazon
  • Micro Servo Amazon
  • Fake Owl Amazon
  • Nplaum Amazon
  • Xim Amazon
  • Screws Amazon
  • USB hais lus Amazon
  • Loj (5v+) lub zog nqa tau hluav taws xob Amazon
  • 3D tshuab luam ntawv Amazon

Kauj Ruam 1: Kauj Ruam 1: Txiav txim siab

Kauj ruam 1: Txiav txim siab
Kauj ruam 1: Txiav txim siab
Kauj ruam 1: Txiav txim siab
Kauj ruam 1: Txiav txim siab
Kauj ruam 1: Txiav txim siab
Kauj ruam 1: Txiav txim siab

a Rub lub taub hau tawm ntawm tus plas (qee zaum koj tsuas yog yuav tsum tau ua phem) los ntawm rub nws lub taub hau qhov twg nws txuas rau lub caij nplooj ntoo hlav.

b. Tus noog lub taub hau txuas rau lub cev los ntawm lub tog raj kheej uas zaum saum lub caij nplooj ntoo hlav loj. Tshem lub tog raj kheej no los ntawm kev tshem tawm cov ntsia hlau.

c. Lub tog raj kheej uas koj nyuam qhuav tshem tawm yog ua los ntawm ob ntu, lub khob yas thiab cov kabmob uas zaum hauv nws. Tshem cov kabmob los ntawm lub tog raj kheej siv tus ntsia hlau (lossis cov cuab yeej zoo sib xws).

d. Siv cov ntsia hlau uas txuas lub tog raj kheej rau lub caij nplooj ntoo hlav, txuas cov servo rau lub tog raj kheej.

e. Tshem lub caij nplooj ntoo hlav los ntawm kev tshem tawm peb lub ntsia hlau uas ruaj nws rau lub cev.

f. Ua lub qhov nyob rau sab saum toj ntawm tus plas lub cev uas loj txaus kom haum qee cov xov hlau thiab lub koob yees duab cable. Peb siv qhov tsis sib xws ua ke ntawm lub laum thiab tus ntsia hlau los ua qhov no.

Kauj Ruam 2: Kauj Ruam 2: Ntxiv Ntse

Kauj ruam 2: Ntxiv Ntse
Kauj ruam 2: Ntxiv Ntse
Kauj ruam 2: Ntxiv Ntse
Kauj ruam 2: Ntxiv Ntse
Kauj ruam 2: Ntxiv Ntse
Kauj ruam 2: Ntxiv Ntse

a 3D luam cov ntaub ntawv lub koob yees duab thiab pleev xim kom phim tus plas - peb siv qee cov xim pleev xim acrylic pheej yig. Kev pleev xim tsis yog cov kauj ruam tseem ceeb, tab sis nws ua rau txhim kho qhov zoo tag nrho!

b. Nrog tus plas lub taub hau taub hau ntswj, ntsaws rau sab saum toj ntawm lub koob yees duab rau sab hauv ntawm nws lub taub hau, qhov twg lub beak nthuav tawm.

c. Muab lub koob yees duab tso rau hauv rooj plaub thiab txuas lub koob yees duab cable.

d. Kaw cov servo rau sab saum toj vaj huam sib luag ntawm lub caij nplooj ntoo hlav.

e. Txuas cov xov hlau ntev mus rau tus pin servo (5V, Gnd, teeb liab)

f. Pub lub koob yees duab cable thiab xov hlau rau qhov kev pabcuam los ntawm lub caij nplooj ntoo hlav thiab los ntawm lub qhov uas koj tau ua nyob rau sab saum toj ntawm lub cev kom lawv nyob hauv pliaj lub cev hollow.

Kauj Ruam 3: Kauj Ruam 3: Sau Nws Li

Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws
Kauj Ruam 3: Sau Nws

a Tshem lub ntsaws los ntawm hauv qab ntawm tus plas thiab nce qhov loj ntawm qhov no los ntawm kev txiav cov yas. Txuas ntxiv qhov loj kom txog thaum Raspberry Pi thiab tus hais lus tuaj yeem haum rau hauv lub cev ntawm tus plas.

b. Thaum lub qhov loj txaus rau txhua qhov khoom siv kom haum rau sab hauv, rub lub koob yees duab cable uas koj pub los ntawm sab saum toj ntawm tus plas tawm ntawm lub hauv paus thiab ntsaws rau hauv Raspberry Pi.

c. Ib yam li ntawd, rub cov servo xov hlau hla thiab ntsaws rau hauv Raspberry Pi:

  • +5v ntawm servo => +5V ntawm Pi
  • Gnd servo => gnd Pi
  • Teeb liab servo => pin 12 Pi

d. Txuas lub USB hais lus rau hauv Pi.

e. Ntxig daim npav SD rau hauv Pi.

f. Power Pi siv lub hwj chim nqa tau.

g. Ntxig rau Pi, lub hwj chim thiab tus hais lus rau hauv pliaj los ntawm lub qhov hauv paus.

Kauj Ruam 4: Kauj Ruam 4: Teeb Tus Pi

Kauj ruam 4: Teeb Pi
Kauj ruam 4: Teeb Pi

Txhua tus lej tuaj yeem nrhiav tau ntawm

a Rub tawm Raspian thiab xa nws mus rau koj daim npav SD siv Balena Etcher.

b. Txhawm rau nkag mus rau koj tus pi nyob deb

  • Ntxiv cov ntaub ntawv hu ua ssh rau koj daim npav boot SD
  • Ntxiv ib daim ntawv hu ua wpa_supplicant.conf thiab muab koj li ntaub ntawv pov thawj wifi nkag rau

    ctrl_interface = DIR =/var/run/wpa_supplicant GROUP = netdev update_config = 1

    network = {ssid = "MySSID" psk = "MyPassword"}

c. Ntxig daim npav SD hauv pi thiab sim nkag mus ntawm ssh.

Kauj Ruam 5: Kauj Ruam 5: Tsiv Lub Taub Hau

Kauj Ruam 5: Tsiv Lub Taub Hau
Kauj Ruam 5: Tsiv Lub Taub Hau

Txoj cai qhia rau txav lub taub hau (tswj hwm servo nrog raspberry pi)

Txhawm rau tswj lub servo khiav ntawm Pi peb tab tom tsim cov ntawv uas tswj hwm GPIO pins uas servo txuas nrog.

a Txuas tus servo rau Pi:

  • +5v ntawm servo => +5V ntawm Pi
  • Gnd servo => gnd ntawm Pi
  • Teeb liab servo => tus pin 12 ntawm Pi

b. Koj yuav tsum xub teeb tsa gpio pins los siv PWM ntawm tus pin teeb liab ntawm servo.

c. Tom qab ntawd, nws yog qhov yooj yim xws li xaiv lub voj voog ua haujlwm (piav qhia ntawm no) ntawm lub cim taw qhia kom txav lub servo los ntawm 90 degrees nrog lub voj voog ua haujlwm ntawm 7.5 txog 0 degrees thaum lub voj voog ua haujlwm yog 2.5 thiab mus rau 180 degrees nrog lub voj voog ua haujlwm ntawm 12.5

ntshuam RPi. GPIO ua GPIO

ntshuam sijhawm GPIO.setmode (GPIO. BOARD) GPIO.setwarnings (Cuav) GPIO.setup (12, GPIO. OUT) p = GPIO. PWM (12, 50) p.start (7.5) sim: thaum Muaj tseeb: p. ChangeDutyCycle (7.5) # 90 degrees sijhawm.sleep (1) p. ChangeDutyCycle (2.5) # 0 degrees time.sleep (1) p. ChangeDutyCycle (12.5) # 180 degrees time.sleep (1) tshwj tsis yog KeyboardInterrupt: p.stop () GPIO.cleanup ()

Kauj Ruam 6: Kauj Ruam 6: Ua Nws Hoot

Kauj Ruam 6: Ua Nws Hoot
Kauj Ruam 6: Ua Nws Hoot
Kauj Ruam 6: Ua Nws Hoot
Kauj Ruam 6: Ua Nws Hoot

Kev qhia ua lej rau ua tus plas hoot (ua si suab nrog raspberry pi)

a Txuas lub USB hais lus.

b. Rub tawm lub suab - peb tau xaiv lub suab nrov.

c. Ua lub suab los ntawm kev ua cov lus txib no: omxplayer -o alsa: hw: 1, 0 owl_sound.mp3

[d. Yog tias qhov no tsis ua haujlwm, txheeb xyuas qhov tso tawm koj Pi siv thiab qhov ntim li cas los ntawm kev siv cov lus txib alsamixer - koj yuav tau txais tos nrog lub vijtsam sib tov qhov twg koj tuaj yeem hloov lub ntim thiab xaiv koj lub cuab yeej media. Txhawm rau nce lub suab ntawm koj lub suab, ua cov lus txib zoo li no omxplayer -o alsa: hw: 1, 0 owl_sound.mp3 --vol 500 Txhawm rau ua lub suab no siv Python, saib ntawm peb cov ntawv xeem.]

ntshuam sub txheej txheem

hais kom = "omxplayer -o alsa: hw: 1, 0 owl_sound.mp3 --vol 500" player = subprocess. Popen (command.split (''), stdin = subprocess. PIPE, stdout = subprocess. PIPE, stderr = subprocess. PAB NTAWV)

Kauj Ruam 7: Kauj Ruam 7: Tshaj Tawm Cov Duab Los Ntawm Pi

Kauj Ruam 7: Tshaj Tawm Cov Duab Los Ntawm Pi
Kauj Ruam 7: Tshaj Tawm Cov Duab Los Ntawm Pi
Kauj Ruam 7: Tshaj Tawm Cov Duab Los Ntawm Pi
Kauj Ruam 7: Tshaj Tawm Cov Duab Los Ntawm Pi

Code qhia tsim raspberry pi lub koob yees duab kwj

a Khiav nab hab sej app.py thiab saib ntawm koj lub network hauv zos ntawm https://raspberrypi.local: 5000

b. Cov cai no tau coj thiab hloov pauv me ntsis los ntawm Miguel Grinberg https://blog.miguelgrinberg.com/post/flask-video-… Lub hauv paus ntsiab lus yog tias peb siv xov thiab tsim hluav taws xob txhawm rau txhim kho kev tshaj tawm nrawm.

Kauj Ruam 8: Kauj Ruam 8: Nrhiav Lub Cev

Kauj Ruam 8: Txheeb Xyuas Lub Cev
Kauj Ruam 8: Txheeb Xyuas Lub Cev

Code rau kev kuaj lub cev (ImageNetSSD ntawm cov vis dis aus nrog raspberry pi)

a Txij li thaum peb tab tom siv Raspberry Pi 4, peb xav tias nws yog qhov zoo tshaj plaws los sim qee qhov qauv kawm tob ntawm nws es tsis yog txoj hauv kev HaarCascade peb tau txwv rau tam sim no.

b. Peb tau saib qee qhov ntawm cov qauv ua ntej tau kawm tawm, zoo li YOLOv3 uas zoo li txias heev. YOLOv3 qhov hnyav me me, uas yuav zoo rau Pi, tab sis peb tsis tuaj yeem khiav nws:(c. Hloov chaw, peb tau xaiv rau MobileSSD tus qauv uas peb tuaj yeem ua haujlwm siv openCVs DNN (sib sib zog nqus neural net), raws li peb tau kawm los ntawm txoj cai no: https://heartbeat.fritz.ai/real-time-object-detection-on-raspberry -pi-use-opencv-dnn-98827255fa60 thiab los ntawm tus phab ej ntawm kev ua duab qhia, Adrian Rosebrock: https://www.pyimagesearch.com/2017/09/11/object-detection-with-deep-learning-and- opencv/

d. Txawm li cas los xij, raws li peb tab tom sim kwj cov ntsiab lus no thiab ua qauv ntawm txhua lub thav duab, qhov no ua rau muaj kev lag luam qeeb, cov vis dis aus tawg. Peb tau kawm dua los ntawm Adrian Rosebrock https://www.pyimagesearch.com/2017/10/10/16/raspberry-pi-deep-learning-object-detection-with-opencv/ thiab siv Python multiprocessing module tso peb cov duab rau hauv kab qhov twg lawv tuaj yeem ua tiav yam tsis thaiv lub koob yees duab kwj kom hnyav.

e. Sim khiav txoj cai koj tus kheej:)

Kauj Ruam 9: Kauj Ruam 9: Xa Cov Lus Qhia Zombie

Kauj Ruam 9: Xa Cov Ntawv Ceeb Toom Zombie
Kauj Ruam 9: Xa Cov Ntawv Ceeb Toom Zombie
Kauj Ruam 9: Xa Cov Ntawv Ceeb Toom Zombie
Kauj Ruam 9: Xa Cov Ntawv Ceeb Toom Zombie

Code rau xa ntawv ceeb toom (nab nab mus rau xov tooj)

a Peb txiav txim siab siv https://pushed.co kev pabcuam ceeb toom.

b. Koj tuaj yeem tau txais tus lej pub dawb thiab rub tawm lub app thiab sai sai tau teeb tsa ua cov ntawv ceeb toom mobile. Peb tsim cov ntawv ceeb toom siv tsab ntawv nab nab zoo li no.

ntshuam thov

payload = {"app_key": "APP_KEY", "app_secret": "APP_SECRET", "target_type": "app", "content": "Owl tau kuaj pom tus zombie." } r = thov.post ("https://api.pushed.co/1/push", data = payload)

Nws yooj yim heev thiab koj tuaj yeem hloov kho koj lub npe ceeb toom!

Kauj ruam 10: Dab tsi Hoot

Dab Tsi Hoot!
Dab Tsi Hoot!

Peb cia siab tias koj txaus siab rau peb Qhov Kev Ruaj Ntseg Ruaj Ntseg Zoo! Qhov no tau ua qhov lom zem tshaj plaws thiab kuv xav tias muaj kev nyab xeeb ntau dua paub tias kuv lub tsev tau raug saib xyuas los ntawm peb tus nus uas ntseeg siab.

Yog tias koj xav tias qhov no yuav yog Xus zoo ntxiv rau koj lub tsev ntse, thov pov npav rau peb hauv Kev Qhia Xus kev sib tw thiab raws li ib txwm muaj, thov nco ntsoov nyiam, tawm tswv yim thiab sau npe yuav!

Sau npe rau Peb Cov Npe Xa Ntawv!

Pom zoo: