Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Sib sau RPi
- Kauj Ruam 2: Txiav thiab Sib Sau Cov Thawv
- Kauj Ruam 3: Mount Reed Hloov thiab Khiav Cable
- Kauj Ruam 4: Txuas Koj Raspberry Pi rau Koj Lub Wifi
- Kauj ruam 5: Nruab thiab teeb tsa Software
Video: Tus Tswj Tsheb Loj: 5 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Txoj haujlwm no tau los txog thaum kuv yuav tawm hauv tsev mus ua haujlwm thiab mus txog ib nrab txoj kev, tsuas yog kom muaj lub sijhawm txaus ntshai nyob qhov twg kuv tsis tuaj yeem nco qab yog tias kuv tau kaw lub qhov rooj rau tsheb. Qee lub sij hawm kuv ntseeg kuv tsis tau, thiab tig rov los, tsuas yog kom paub tseeb tias kuv tau kaw qhov rooj rau tsheb. Tam sim no kuv tau tuaj lig 30 feeb los ua haujlwm… zoo kawg. Thaum kuv yuav kuv tus kheej lub tsev, Kuv xav tam sim no yog thaum kuv tuaj yeem ua txhua yam kuv xav tau rau kuv lub qhov rooj qhib qhov rooj tsheb, thiab lub tswv yim no tau yug los.
Khoom siv
- Raspberry Pi - Kuv xav tias tsuas yog hais txog txhua tus qauv yuav tsum ua haujlwm, tsuav nws tuaj yeem khiav Django, NGINX, thiab phom. Kuv siv Raspberry Pi 3 B+. Tej zaum koj yuav tsum tau hloov qee yam yog tias koj muaj qhov txawv version. - (https://www.adafruit.com/product/3775)
- microSD daim npav (rau
- 40 -pin ribbon cable rau GPIO pins - (https://www.adafruit.com/product/1988)
- 4 -pin GPIO breakout board - (https://www.adafruit.com/product/2029)
- Opto -Isolated relay board ntsuas rau> 20v DC - (https://www.amazon.com/gp/product/B07M88JRFY)
- Perma-Proto ib nrab-pawg thawj coj saib-(https://www.adafruit.com/product/1609)
- hlau txuas (~ 24-20 AWG) - (https://www.amazon.com/dp/B01LH1FYHO)
- Sib Nqus Reed Hloov - (https://www.amazon.com/gp/product/B076GZDYD2)
- Raspberry Pi HDMI plua plav npog - (https://www.amazon.com/gp/product/B07P95RNVX)
- Raspberry Pi Ethernet hmoov av npog - (https://www.amazon.com/gp/product/B01I814D0U)
- Raspberry Pi USB plua plav npog (4) - (https://www.amazon.com/gp/product/B074NVHTF9)
- Raspberry Pi lub zog siv hluav taws xob (nyob ntawm tus qauv ntawm raspberry pi koj siv)
- Cov ntaub ntawv Raspberry Pi - (https://www.amazon.com/gp/product/B07QPCPK8G)
- 3.5 hli nkaus - (https://www.amazon.com/gp/product/B00OGLCR3W)
- M2.5 ntsia hlau/standoffs rau cov laug cam - (https://www.amazon.com/dp/B0721SP83Q)
- 18 AWG cable - (https://www.amazon.com/gp/product/B07TL9XK2K)
- 3mm ntshiab acrylic - (https://www.amazon.com/gp/product/B07RY4X9L3)
- nkag mus rau laser cutter
Kauj Ruam 1: Sib sau RPi
sau daim npav microsd nrog cov duab raspbian kawg ntawm koj xaiv. (https://www.raspberrypi.org/documentation/installation/installing-images/) tom qab ntawd sib sau ua ke lub rooj tsavxwm hauv rooj plaub, thiab txuas daim kab xev ua ntej ruaj ntseg lub hau ntawm rooj plaub. Tom qab ntawd ntxiv cov plua plav chaw nres nkoj.
Kauj Ruam 2: Txiav thiab Sib Sau Cov Thawv
Koj yuav tsum nrhiav qhov chaw uas yuav cia koj txiav koj lub thawv rau ntawm lub tshuab txiav laser, saib rau lub chaw tsim khoom hauv online lossis online rau cov chaw uas tuaj yeem txiav acrylic. Xwb, koj tuaj yeem siv lwm yam ntawm lub npov qhov project nrog qhov tsim nyog. Nco ntsoov ntxiv 330 Ohm resistor nruab nrab ntawm 3.3v kab thiab COM davhlau ya nyob twg ntawm tus ntoo qhib. N. O. lub dav hlau rov qab mus rau GPIO tus pin xaiv.
Hlau txuas nrog 5v mus rau DC+, GND rau DC-, thiab GPIO tus pin xaiv rau IN.
Lub qhov rooj qhib lub qhov rooj tsheb yuav mus txuas nrog txuas ntawm COM thiab NO
Kauj Ruam 3: Mount Reed Hloov thiab Khiav Cable
Nco ntsoov tias koj lub cable tsis cuam tshuam kev mus los ntawm koj lub qhov rooj. Hlau rau tib ob tus ntsia hlau uas koj cov phab ntsa khawm txuas kom qhib lub qhov rooj.
Kauj Ruam 4: Txuas Koj Raspberry Pi rau Koj Lub Wifi
thiab xyuas kom koj tuaj yeem SSH rau koj tus raspberry pi yog li koj tuaj yeem teeb tsa lub web server. koj tuaj yeem teeb nws hauv koj lub nkas -las thiab tus so tuaj yeem ua tiav los ntawm koj lub khoos phis tawj.
Kauj ruam 5: Nruab thiab teeb tsa Software
ntawm Raspberry Pi, nruab Django nrog cov lus txib:
- `sudo apt hloov tshiab`
- `sudo apt nruab python3-pip`
- `sudo pip3 nruab django`
Tom qab ntawd teeb tsa NGINX thiab rab phom
- `sudo apt nruab nginx`
- `sudo pip3 nruab gunicorn`
Txhim kho tus nab npawb nab npawb tsim qhov project django, tsim kev tsiv teb tsaws chaw, thiab teeb tsa settings.py
- luam daim npav tarball rau /srv
- nruab siv 'sudo pip3 nruab django-smart-carhole-0.1.tar.gz`
- tsim django project nrog `sudo django-admin startproject my_smart_garage`
-
`cd my_smart_garage/`
- kho cov ntawv settings.py pom ntawm /srv/my_smart_garage/my_smart_garage/setting.py
- ntxiv IP chaw nyob ntawm raspberry pi lossis nws lub npe host hauv ALLOWED_HOSTS
- ntxiv 'door_control', rau INSTALLED_APPS daim ntawv teev npe
- Kho TIME_ZONE rau koj lub sijhawm
- Ntxiv cov kev teeb tsa hauv qab no mus rau qhov kawg ntawm cov ntaub ntawv: RPI_SENSOR_PIN, RPI_RELAY_PIN, IP_WHITELIST_DOORCONTROL thiab sau nrog nws cov txiaj ntsig. Saib cov duab ua piv txwv.
- Ntxiv "txoj kev ('door_control/', suav nrog ('door_control.urls'))," rau /srv/my_smart_garage/my_smart_garage/urls.py hauv cov npe urlpatterns
- ntxiv ', suav nrog' rau kab kev ntshuam nyob rau saum toj rau django.urls lub tsev qiv ntawv. Saib cov duab ua piv txwv.
- migrate lub app nrog 'sudo python3 manage.py migrate'
- sim kom paub tseeb tias txhua yam ua haujlwm los ntawm kev ua haujlwm ntsuas server nrog: `python3 manage.py runerver 0.0.0.0: 8000`
- Nkag mus rau koj tus raspberry pi zoo li: https:// [ipaddress]: 8000/door_control
- Koj yuav tsum tau ntsib nrog nplooj ntawv zoo li qhia.
Tam sim no nws yog lub sijhawm los teeb tsa nws kom lub web server ua haujlwm tau zoo.
- Ua ntej lov tes taw debug hom hauv cov ntawv setting.py
- tsis pom zoo rau server_names_hash_bucket_size 64 hauv /etc/nginx/nginx.conf
- luam cov ntawv gunicorn rau /etc/systemd/system/gunicorn.service
- luam cov ntawv nginx rau /etc/nginx/conf.d/smart_carhole.conf
- pib ob txheej txheem
- systemctl pab gunicorn.service
- systemctl pib gunicorn.service
- systemctl pab kom nginx.service
Pom zoo:
Yuav Ua Li Cas Tswj 4dof Lub Hwj Chim Loj Loj Loj Loj Caj Npab Nrog Arduino thiab Ps2 Chaw Taws Teeb?: 4 Kauj Ruam
Yuav Ua Li Cas Tswj 4dof Lub Hwj Chim Loj Loj Loj Loj Caj Npab Nrog Arduino thiab Ps2 Chaw Taws Teeb?: Cov khoom siv no siv lub zog loj mg996, nws xav tau lub zog tam sim no, peb tau sim ntau lub hwj chim nkag. Tsuas yog 5v 6a adapter yuav ua haujlwm. Thiab arduino board ua haujlwm ntawm 6dof neeg hlau caj npab also.end: sau yuav SINONING Ib lub khw rau DIY khoom ua si
Tsheb Tswj Chaw Taws Teeb - Tswj Kev Siv Wireless Xbox 360 Tus Tswj: 5 Kauj Ruam
Lub Tsheb Tswj Chaw Taws Teeb - Tswj Kev Siv Wireless Xbox 360 Tus Tswj: Cov no yog cov lus qhia txhawm rau tsim koj tus kheej lub tsheb tswj chaw taws teeb, tswj siv wireless Xbox 360 maub los
ARUPI - Tus Nqi Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: 8 Kauj Ruam (nrog Duab)
ARUPI - Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi Tus Nqi Uas Tau Txais Tus Nqi/Tus Kheej Tus Kheej (ARU) rau Soundscape Ecologists: Cov lus qhia no tau sau los ntawm Anthony Turner. Txoj haujlwm tau tsim los nrog ntau qhov kev pab los ntawm Shed hauv Tsev Kawm Ntawv ntawm Kev Suav, University of Kent (Mr Daniel Knox tau pab zoo!)
Lub Hwj Chim Loj Loj Loj LED Loj M.k2: 10 Cov Kauj Ruam (nrog Duab)
Lub Hwj Chim Loj Loj Loj Loj Loj M.k2: Tau ua si ib puag ncig nrog cov nroj tsuag cog hauv qab LED teeb ua ntej, Kuv xav tias kuv yuav tsum mus ntawm kev tsim lub zog loj dua siv lub zog loj LED's ……… Kuv thov zam txim yog tias nws zoo li kuv tabtom ntaus tus nees tuag, qhov no yuav yog kuv qhov kev qhia kawg ntawm g
Tsim kom muaj tsheb loj loj RC MONSTER TRUCK - Golf Log Log - Moped Motor - Tswj Chaw Taws Teeb: 10 Kauj Ruam
Tsim kom muaj tsheb loj loj RC MONSTER TRUCK - Golf Log Log - Moped Motor - Kev Tswj Chaw Taws Teeb: Nov yog DIY los tsim lub tsheb loj loj Monster Monster. Koj yuav tsum muaj tus kws khomob. Kuv tau zoo siab pom cov tsheb thauj khoom tswj chaw deb tuaj deb dhau ob peb xyoos dhau los. Kuv tseem muaj ntau tus ntawm lawv raws li wa