Cov txheej txheem:
- Kauj Ruam 1: Kev Txuas Hluav Taws Xob rau Koj Raspberry Pi Siv Wifi
- Kauj Ruam 2: Nkag Siab Lub Lole ntawm L293D
- Kauj Ruam 3: Kev thaiv kab hlau
- Kauj Ruam 4: Qee Qhov Soldering…
- Kauj ruam 5: Upload Software
- Kauj Ruam 6: Tsim Koj Lub Rover
Video: Tsav koj RaspberryPi: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Cov lus qhia no yuav ntxiv lub log rau koj Raspberry pi kom koj tuaj yeem nqa koj txoj haujlwm uas tsis muaj transistor tau ua ntej.
Phau ntawv qhia no yuav taug kev koj los ntawm cov txheej txheem ntawm yuav ua li cas tswj cov motors los ntawm Wi-nkaus Network. Raws li txoj haujlwm no tau tsim los siv cov khoom seem los ntawm lub thawv nto npe ntawm cov yas tsis muaj qhov uas kuv khaws cia yam tsis muaj laj thawj, koj yuav xav siv qee qhov kev muaj tswv yim los txheeb xyuas txoj hauv kev zoo tshaj plaws los txuas cov khoom no ua ke thiab tsim koj lub rover.
Khoom siv:
- Raspberry Pi Zero W.
- L293D ua
- DC 3V-6V DC Gear Tsav rau Arduino 3
- Ntse Neeg Hlau Tsheb Log
- Dhia xov hlau
- USB cable
- Lub roj teeb tuav (4 AA roj teeb)
- Cov qhob cij
- Soldering Hlau
- Screws, kab xev, kua nplaum, txhua yam uas tuav cov khoom ua ke.
Kauj Ruam 1: Kev Txuas Hluav Taws Xob rau Koj Raspberry Pi Siv Wifi
Thawj lub hom phiaj yog txhawm rau txuas mus rau Raspberry pi (RPi). Piv txwv tias koj twb tau teeb tsa lub operating system Raspberry Pi OS (muaj nyob ntawm no), koj yuav tsum:
- Txuas RPi rau Wi-nkaus
- Nrhiav nws tus IP Chaw Nyob
- Pab kom VNC server ntawm RPi
- Rub tawm ntawm koj lub smartphone/ntsiav tshuaj app VNC tus saib.
1) Thawj kauj ruam yog qhov ncaj ncees xav tias koj muaj tus saib xyuas thiab cov keyboard uas koj tuaj yeem txuas rau RPi, qhov no koj tuaj yeem siv tus neeg siv cuam tshuam zoo li koj xav tau ntawm lub khoos phis tawj. Yog tias koj tsis tuaj yeem siv lub ntsuas saib, koj yuav tsum ua raws cov lus qhia rau kev teeb tsa lub taub hau.
2) Rub tawm software "Advanced IP Scanner"; nyem rau ntawm scan thiab nws yuav tso tawm txhua lub cuab yeej ntawm koj lub network hauv zej zog thiab lawv tus IP chaw nyob.
3) Txhawm rau pab VNC server koj yuav tsum qhib lub davhlau ya nyob twg thiab khiav cov lus txib hauv qab no:
sudo raspi-teeb tsa
Tom qab ntawd xauj mus rau Kev Sib Txuas Xaiv, xaiv VNC Server thiab teeb nws rau Enabled. Yog tias koj yog ib tus ntawm cov neeg uas tsis muaj tus saib xyuas koj yuav tsum ua cov kauj ruam no siv SSH kev sib txuas.
4) Thaum kawg, rub lub app VNC Viewer ntawm koj lub xov tooj, coj mus rhaub rau "+" icon, ntaus tus IP chaw nyob ntawm koj RPi, muab lub npe rau nws, thiab ntaus txuas. Cov ntawv pov thawj tsis raug yog:
Tus neeg siv: pi Pass: raspberry
Kauj Ruam 2: Nkag Siab Lub Lole ntawm L293D
Cov pins ntawm RPi tau tsav los ntawm 3.3 V txoj kev tsheb nqaj hlau thiab muab qhov siab tshaj ntawm 16mA ntawm ib tus pin. Qhov ntawd tsis txaus los siv lub cav. Cov pins tsuas yog ua lub cim taw qhia kom txav txhua lub cav mus rau tom ntej lossis rov qab; raws li qhov kev tawm tswv yim cais cais hu ua H-Choj yuav hloov pauv qhov sib txawv ntawm qhov hluav taws xob siv rau lub cav siv AA roj teeb ua lub zog siv. L293D muaj ob H-txuas txuas yog li koj tuaj yeem txuas ob lub cav rau nws.
Koj yuav tsum xaiv 4 tus pin los ntawm raspberry pi thiab txuas lawv mus rau cov tswj kev nkag pins (7, 2, 10, 15) ntawm L293D.
Kauj Ruam 3: Kev thaiv kab hlau
Txuas RPi thiab L293D rau ntawm daim ntawv tais; muab L293D tso rau hauv nruab nrab ntawm lub khob cij kom txhua tus ntawm nws cov pins nyob ntawm txoj kab ywj pheej. Tom qab ntawd ua kom tiav cov thaiv uas siv cov xov hlau dhia.
Kauj Ruam 4: Qee Qhov Soldering…
Muaj ob peb txoj haujlwm yuav tsum tau ua:
Koj yuav tsum tau xaim 2 dhia xov hlau rau txhua lub cav thiab txuas cov no rau tus lej sib thooj ntawm L293D
Koj yuav tsum txuas lub roj teeb tuav lub zog (5V) thiab xaim hauv av mus rau cov xov tooj sib txuas ntawm USB cable kom koj tuaj yeem txhawb koj RPi siv roj teeb
Kauj ruam 5: Upload Software
Fais fab koj raspberry pi thiab txuas rau nws.
Cov chaw taws teeb nyob deb tau tsim los siv tkinter hauv nab hab sej.
Nruab lub tsev qiv ntawv no khiav cov lus txib
sudo apt-tau nruab python3-tk
Tsim ib daim ntawv tshiab hu ua Remote.py thiab luam-muab tus lej txuas nrog.
Cov nyees khawm sib txuas tau txuas rau 4 lub luag haujlwm hauv qab no uas teeb tsa tus pin rau HIGH lossis LOW hauv kev teeb tsa sib txawv:
def Fw (): GPIO.output (20, GPIO. LOW) GPIO.output (21, GPIO. LOW) GPIO.output (23, GPIO. HIGH) GPIO.output (24, GPIO. HIGH) luam tawm ("Mus rau tom ntej")) def Bk (): GPIO.output (20, GPIO. HIGH) GPIO.output (21, GPIO. HIGH) GPIO.output (23, GPIO. LOW) GPIO.output (24, GPIO. LOW) luam tawm ("Rov Qab ") def Stop (): GPIO.output (20, GPIO. LOW) GPIO.output (21, GPIO. LOW) GPIO.output (23, GPIO. LOW) GPIO.output (24, GPIO. LOW) luam tawm (" Nres ") def Sab laug (): GPIO.output (20, GPIO. LOW) GPIO.output (21, GPIO. LOW) GPIO.output (23, GPIO. HIGH) GPIO.output (24, GPIO. LOW) def Right (): GPIO.output (20, GPIO. LOW) GPIO.output (21, GPIO. LOW) GPIO.output (23, GPIO. LOW) GPIO.output (24, GPIO. HIGH) luam tawm ("Txoj cai")
Thaum npaj txhij los sim qhov kev sim, qhib lub qhov rai davhlau ya nyob twg tshiab, xauj mus rau qhov chaw cov ntaub ntawv thiab khiav cov lus txib:
sej 3 Remote.py
Kauj Ruam 6: Tsim Koj Lub Rover
Thaum kawg koj tuaj yeem txiav txim siab seb koj lub rover yuav zoo li cas … Kuv muaj qee daim hardboard, pob yas hamster uas zoo li R2D2, lub koob yees duab khoob uas kuv txuas nrog TX RX tus pin (tab sis yog tias koj npaj yuav muab lub koob yees duab tom qab siv lub koob yees duab tseem ceeb sib txuas yog li koj tau txais cov vis dis aus nyob ua ke)
Kuv tsis muaj lub log thib peb yog li kuv yuav tsum tau tsim kho. Kuv 3d-luam qee daim los tuav txhua yam ua ke, Kuv tso lawv txuas yog tias koj xav tau
Pom zoo:
HACKED! Servo Tsav Raws Li Tus Qauv Tsav Tsheb!: 17 Cov Kauj Ruam
HACKED! Servo Motor Raws Li Tus Qauv Tsav Tsheb!: Pib ua qauv tsheb ciav hlau? Tsis muaj peev nyiaj txaus los yuav tag nrho cov tsheb ciav hlau kim tswj? Tsis txhob txhawj! Hauv cov lus qhia no, Kuv yuav qhia koj li cas koj tuaj yeem ua rau koj tus kheej cov peev txheej qis tsheb nqaj hlau tswj los ntawm kev nyiag lub cav servo. Yog li, cia peb
Covid-19 Daim npog qhov ncauj uas qw ntawm koj yog tias koj kov koj lub ntsej muag: 4 kauj ruam
Covid-19 Daim npog qhov ncauj uas qw ntawm koj yog tias koj kov koj lub ntsej muag: Tsis tuaj yeem nres kov koj lub ntsej muag? Khaws cov khoom siv hluav taws xob no mus rau lub npog ntsej muag uas koj muaj thiab koj yuav nco ntsoov tas li tsis txhob ua qhov ntawd
Xaiv Cov Kauj Ruam Tsav Tsheb thiab Tsav Tsheb rau Arduino Automated Shade Screen Project: 12 Cov Kauj Ruam (nrog Duab)
Xaiv Cov Kauj Ruam Tsav Tsheb thiab Tsav Tsheb rau Arduino Automated Shade Screen Project: Hauv Cov Lus Qhia no, Kuv yuav hla cov kauj ruam uas kuv tau xaiv los xaiv Lub Kauj Ruam Tsav Tsheb thiab Tsav Tsheb rau qhov ua piv txwv Automated Shade Screen project. Cov ntxaij vab tshaus ntxoov ntxoo yog qhov nrov thiab pheej yig Coolaroo tes cranked qauv, thiab kuv xav hloov
Pike - Tsav Kev Nyab Xeeb, Tsav Ntse, Tsav Tus Pike!: 5 Kauj Ruam
Pike - Tsav Kev Nyab Xeeb, Tsav Zoo, Tsav Pike!: Zoo siab txais tos rau kuv qhov project hu ua Pike! Nov yog qhov haujlwm raws li ib feem ntawm kuv txoj kev kawm. Kuv yog tub ntxhais kawm NMCT ntawm Howest hauv Belgium. Lub hom phiaj yog ua kom qee yam ntse los ntawm kev siv Raspberry Pi. Peb muaj kev ywj pheej tiav uas peb xav ua ntse.Rau rau kuv nws wa
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Info: 4 Cov Kauj Ruam
Yuav Ua Li Cas Tau Txais Cov Nkauj Los Ntawm Txhua Qhov (Haha) Lub Vev Xaib (Ntev Li Koj Tau hnov Nws Koj Yuav Tau Txais Nws … Ok Zoo Yog Nws Tau Ntxig Hauv Flash Koj Yuav Tsis Muaj Peev Xwm) EDITED !!!!! Ntxiv Cov Lus Qhia: yog tias koj tau mus rau lub vev xaib thiab nws ua nkauj nkauj uas koj nyiam thiab xav tau nws ntawm no yog cov lus qhia rau koj tsis yog kuv qhov txhaum yog tias koj cuam tshuam qee yam (tsuas yog txoj hauv kev nws yuav tshwm sim yog tias koj pib tshem cov khoom yam tsis muaj laj thawj. ) Kuv tuaj yeem tau txais cov nkauj rau