Cov txheej txheem:

Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam: 9 Kauj Ruam
Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam: 9 Kauj Ruam

Video: Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam: 9 Kauj Ruam

Video: Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam: 9 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam
Txiv tsawb/Raspberry Pi + Arduino Rover Nrog Webcam

Ib qhov project kuv tau ua hauv kuv lub sijhawm tsis khoom. Nws yog lub tshuab ua haujlwm 4 log neeg hlau tswj los ntawm lub vev xaib interface. Yog tias koj muaj lus nug lossis lus nug thov hu rau kuv. Txoj haujlwm no nws tus kheej siv 3D cov ntawv luam tawm thiab qee cov cai uas tau tsim los ntawm lwm tus neeg. Koj tuaj yeem pom cov qhab nia thiab saib qhov qub daim ntawm qhov kawg ntawm Instructuble.

Peb puas yuav pib?

Kauj Ruam 1: Cheeb Tsam Koj Xav Tau

Cheeb Tsam Koj Xav Tau
Cheeb Tsam Koj Xav Tau
Cheeb Tsam Koj Xav Tau
Cheeb Tsam Koj Xav Tau
Cheeb Tsam Koj Xav Tau
Cheeb Tsam Koj Xav Tau

Nov yog cov npe ntawm cov khoom kuv siv nrog cov txuas thiab lwm txoj hauv kev. Kuv nyob hauv Shenzhen, Suav teb thiab kuv yuav cov khoom ncaj qha ntawm Taobao.

4-lub cev muaj zog neeg hlau chassis Alternative: Txhua lub chassis loj txaus yuav ua. Qhov no muaj 4 lub cav rau qee qhov ntxiv lub zog. Cov motors yog pheej yig daj motors, rater rau

L293D Arduino Motor Shield rev

Arduino Uno clone Lwm txoj hauv kev: Koj tuaj yeem siv lwm lub Rooj Tswjhwm Saib Arduino yam tsis muaj kev hloov pauv tseem ceeb rau txoj cai.

6V 4.5Ah Pb roj teeb Lwm txoj hauv kev: Nws tuaj yeem sim nrog cov roj teeb LiPo me dua yog tias koj xav tau cov neeg hlau sib zog/siv ob lub cav nkaus xwb.

Banana Pi Lwm Yam: Muaj peev xwm sib pauv rau Raspberry Pi 1/2/3 lossis Orange Pi tsis muaj qhov hloov pauv tseem ceeb. Kuv siv Banana Pi nkaus xwb vim tias kuv tau pw ib ncig.

Lwm lub koob yees duab Web: Lwm Yam Siv CSI lub koob yees duab rau Raspberry Pi/Banana Pi/Orange Pi

Lub Koob Yees Duab Yias/qaij mount nrog sg60 servos Lwm Yam: 3D Luam qaij/yias mount piv txwv tuaj yeem siv qhov no.

3D luam qhov seem Lwm qhov: Cia koj lub tswv yim thiab txuj ci tsim 3D coj koj! Too Thingverse:)

Kauj Ruam 2: Txuas Cov Tsav Tsheb nrog L293D Lub Cev Tsav Tsheb

Txuas Cov Tsav Tsheb nrog L293D Lub Cev Tsav Tsheb
Txuas Cov Tsav Tsheb nrog L293D Lub Cev Tsav Tsheb
Txuas Cov Tsav Tsheb nrog L293D Lub Cev Tsav Tsheb
Txuas Cov Tsav Tsheb nrog L293D Lub Cev Tsav Tsheb

Txuas txhua lub cav nrog lub cev muaj zog tiv thaiv cov ntsia hlau. Nov yog daim duab thaiv kab. Yog tias koj tsuas muaj ob lub cav thiab tsis xav hloov txoj cai tshaj li muab cov ntawd tso rau MOTOR 1 thiab MOTOR 3.

NCO TSEG: Rau cov uas siv cov cav sib txawv nrog qhov ntsuas siab dua tam sim no, koj yuav xav tau lwm tus tsav tsheb. Xwb, qhov zoo me ntsis hack kuv tau kawm tsis ntev los no yog tias koj tuaj yeem piggyback ob qho ntxiv L293D cov tsav tsheb nyob rau sab saum toj ntawm ib qho uas twb muaj lawm (nws yog nruab nrab nti ntawm lub rooj tsavxwm)!

Kauj Ruam 3: Arduino Uno, Lub Cev Tsav Tsheb Los Ua Ke

Arduino Uno, Lub Cev Tsav Tsheb Los Ua Ke
Arduino Uno, Lub Cev Tsav Tsheb Los Ua Ke

Muab Arduino Uno tso rau hauv rooj plaub thiab nruab Motor Shield rau saum nws. Tsuas muaj ib txoj hauv kev los ua qhov ntawd, yog tias nws tsis haum, koj tab tom ua qee yam!

Arduino Uno Snug Case

Nov yog rooj plaub kuv siv, qauv tsim los ntawm Esquilo.

Kauj Ruam 4: Txuas Lub Hwj Chim rau Txiv tsawb Pi thiab Arduino

Txuas lub Hwj Chim rau Txiv tsawb Pi thiab Arduino
Txuas lub Hwj Chim rau Txiv tsawb Pi thiab Arduino

Kuv siv SATA interface los muab lub zog rau Banana Pi (6v). Yog tias koj muaj tib lub rooj tsavxwm koj tseem tuaj yeem ua qhov ntawd, tsuas yog xyuas kom qhov hluav taws xob yog 5v-6v. Nws tsis muaj kev tswj hwm lub zog, yog li kuv xav tias muaj kev tiv thaiv hluav taws xob rau SATA lub zog ntawm Banana Pi M1.

NCO NTSOOV: Rau Raspberry Pi koj muaj ob peb txoj hauv kev: muaj kev nyab xeeb (siv USB txuas los muab 5v) thiab tsis muaj kev nyab xeeb (siv GPIO pins). Nov yog qhov txuas los nyeem txog kev txuas lub zog rau Raspberry Pi GPIO pins. Nco ntsoov koj

1) Siv cov cai tswj fais fab

2) Teeb qhov hluav taws xob rau 5v

Tsis muaj kev tiv thaiv Circuit Court rau GPIO pins! Yog tias koj ua qee yam tsis raug, muaj qhov pheej hmoo loj ntawm kev puas tsuaj cov khoom siv hluav taws xob ntawm lub rooj tsavxwm.

Rau Arduino tsuas yog xaim lub zog rau lub tshuab ntsia hlau txuas rau ntawm lub cav thaiv. Nws tuaj yeem siv sijhawm txog 12v.

Kauj Ruam 5: Muab Banana Pi tso rau hauv 3D Printed Case, Sib Sau Tag Nrho Cov Rover

Muab Banana Pi tso rau hauv 3D Luam Ntawv Case, Sib Sau Tag Nrho Cov Rover
Muab Banana Pi tso rau hauv 3D Luam Ntawv Case, Sib Sau Tag Nrho Cov Rover
Muab Banana Pi tso rau hauv 3D Printed Case, Sib sau Ua Ke ntawm Rover
Muab Banana Pi tso rau hauv 3D Printed Case, Sib sau Ua Ke ntawm Rover

Kuv siv rooj plaub no rau Banana Pi los ntawm qhov tsis zoo, tsim los ntawm GermanRobotics. Lub hau rau nws kuv ua kuv tus kheej.

Muab Banana Pi tso rau hauv rooj plaub, npog nws nrog lub hau, siv rab phom nplaum los txuas Arduino Uno nyob rau sab saum toj ntawm Banana Pi rooj plaub.

Npog lub roj teeb nrog daim npog no thiab txuas lub vev xaib cam yias/qaij rau saum.

Yog tias koj siv Banana Pi koj yuav xav tau lub USB hub, vim nws tsuas muaj ob lub qhov USB (Raspberry 2, 3 muaj plaub). Ntshiab tawm ntawm kev txhawj xeeb txog kev zoo nkauj Kuv txiav txim siab siv OTG 1-2 USB hub thiab zais cov xov hlau sab hauv Banana Pi rooj plaub.

Kauj ruam 6: Khoos phis tawj khoos phis tawj ua tiav

Khoos phis tawj ua tiav!
Khoos phis tawj ua tiav!

Cia peb sau sai sai qhov peb tau ua dhau los.

Peb tau sib sau ua ke cov neeg hlau platform, txuas lub zog rau Banana Pi, Arduino Uno, txuas lub tshuab thiab servos rau tus tsav tsheb thiab siv USB hub txuas USB lub koob yees duab thiab Arduino Uno rau Banana Pi. Tam sim no koj tuaj yeem sim thiab daws teeb meem kho vajtse. Cov kab hluav taws xob qhia pom txhua qhov kev sib txuas yog hauv daim duab rau theem no.

Kauj Ruam 7: Txheej Txheem Txheej Txheem

Txheej txheem teeb tsa
Txheej txheem teeb tsa

Kuv siv Raspbian Lite duab rau lub kaw lus ntawm kuv tus pi. Lite version tsis muaj GUI, thiab los nrog tsuas yog cov pob yooj yim ib-ntsia. Tab sis nws siv sijhawm tsawg dua, uas txhais tau tias peb tuaj yeem siv daim npav SD me me. Yog tias koj tsis xis nyob tsis muaj GUI koj tseem tuaj yeem teeb duab tag nrho.

Txuas koj tus pi rau Is Taws Nem nrog Ethernet cable. Tom qab nws khau raj thawj kauj ruam yuav yog txuas nws mus rau Wi-nkaus.

Khiav cov lus txib hauv qab no hauv lub davhlau ya nyob twg

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Kho cov ntaub ntawv teeb tsa nrog koj li ntawv pov thawj WiFi

network = {ssid = "kuaj" psk = "testPassword"}

Reboot lub pi. Voila! Tam sim no koj txuas nrog Wi-nkaus.

Tom ntej no peb yuav xav tau nruab pip (Python Package Manager)

sudo apt-tau nruab nruab sej-setuptools

sudo easy_install pip

Tam sim no peb siv pip los teeb tsa Flask rau kev khiav lub vev xaib thiab pyserial rau pi kom sib txuas lus nrog Arduino hla cov ntawv txuas.

sudo pip nruab flask

sudo pip nruab pyserial

Qhov kawg yuav yog txhawm rau teeb tsa thiab teeb tsa cov lus tsa suab, uas peb siv rau kev tshaj tawm video los ntawm peb lub vev xaib.

Ua raws li cov lus qhia zoo no los ua qhov no.

Tam sim no peb tau npaj txhij rau rumble!

Kauj Ruam 8: Pib Pib Software

Pib Pib Software
Pib Pib Software
Pib Pib Software
Pib Pib Software

Nco qab li cas kuv hais tias peb tau npaj ua kom nrov nrov?

Okay, me ntsis ntxiv kev sib tsoo thiab tom qab ntawd peb tuaj yeem pib rumbling:)

Cia rub tawm txhua cov ntaub ntawv tsim nyog los ntawm kuv qhov chaw cia khoom github.

git clone

Upload rover.ino rau Arduino Uno. Yog tias koj tau hloov kho vajtse (siv cov ntaub thaiv sib txawv ntawm lub cev, piv txwv) koj yuav tsum hloov daim duab.

Yog tias koj siv lub vev xaib, hloov kab ze rau hauv qab ntawm qhov index.html cov ntaub ntawv hauv daim ntawv tais ceev tseg. Hloov qhov URL hauv kab IFRAME kom phim src URL rau koj cov vis dis aus.

Tam sim no koj tuaj yeem pib lub vev xaib. Khiav cov lus txib hauv qab no

sudo nab hab sej pi_rover.py

Yog tias koj ua raws li kuv tsim ze heev thiab muaj Arduino txuas nrog koj yuav pom cov hauv qab no (thawj daim duab) hauv lub davhlau ya nyob twg.

Ntaus koj tus neeg hlau tus IP chaw nyob hauv lub vev xaib (piv txwv li hauv kuv rooj plaub nws yog 192.168.1.104), koj tuaj yeem tshawb xyuas tus IP chaw nyob nrog $ ifconfig hais kom ua ntawm Linux.

/ua las voos lom zem ntawm no!/

Yog tias koj muaj lus nug xav nug kuv hauv cov lus. Cov ntawv qhia no yog tsom rau qib pib, tab sis tsis yog xoom-pib, yog vim li cas kuv thiaj luv luv ntawm yam uas koj tuaj yeem tsuas yog google rau (piv txwv li hlawv cov duab system rau SD daim npav, upload Arduino kos duab thiab lwm yam).

Kauj Ruam 9: Khab nias

Lub tswv yim thiab web server chaws los ntawm cov lus qhia zoo no los ntawm jscottb. Kuv hloov kho nws kom siv ntau yam khoom siv sib xws, zoo li Arduino Uno.

Cov ntawv luam tawm 3D los ntawm Thingverse.

www.thingiverse.com/thing: 994827 ua

www.thingiverse.com/thing2816536/files

www.thingiverse.com/thing: 661220

Pom zoo: