Cov txheej txheem:
- Kauj Ruam 1: Teeb Tus Neeg rau zaub mov thiab kev vam khom ntawm Raspberry Pi
- Kauj Ruam 2: Nruab Web Framework thiab Kev teeb tsa rau NGiNX
- Kauj Ruam 3: Teeb tsa Python Cov Ntawv Uas Yuav Sib Tham nrog GPIO
- Kauj Ruam 4: Ua tiav ntawm Php Sab Ntawm Yam
- Kauj Ruam 5: Tsim Circuit Court
- Kauj Ruam 6: Xeem Kawg
- Kauj Ruam 7: Tshooj Ntxiv: Qub Tsev Kawm Qub Clapper Trigger
Video: Teeb-Hloov: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hauv qhov haujlwm no kuv yuav ua piv txwv yuav ua li cas thiaj tsim tau lub kaw lus tswj lub teeb wireless nrog rau ntxiv nyiaj ntxiv thaum kawg. Ua raws nrog rau cov lus qhia ua tiav.
Yuav tsum:
- Raspberry Pi (ib qho tsw zoo, tab sis kuv siv 3B+ qauv)
- Ob lub 2n2222 transistors (Kuv pom zoo yuav tsawg kawg tsib vim tias muaj txoj hauv kev zoo koj yuav luv ob peb los ntawm qhov yuam kev)
-Txiv neej-rau-Txiv neej thiab Txiv neej-rau-Poj niam jumper cables
- Cov qhob cij
- (xaiv tau tab sis pom zoo) Breadboard 5V fais fab mov
- Ob ntawm txhua 1k thiab 10k resistors
Dual-Relay module
- Ob lub teeb qub hauv tsev lossis lwm yam khoom siv teeb pom kev zoo (siv cov qij coj los ua cov roj teeb uas zoo li yuav hlawv thaum ntsuas)
- Cov kab xev thiab kab xev txiav rau txuas
Kauj Ruam 1: Teeb Tus Neeg rau zaub mov thiab kev vam khom ntawm Raspberry Pi
Rau kuv qhov haujlwm kuv siv NGiNX, txawm hais tias koj tuaj yeem siv qhov twg koj xav tau server (Apache2, thiab lwm yam). Lub vanilla nruab nrog tus thawj tswj hwm pob tsuas yog zoo, tsis tas yuav suav peb tus kheej qhov chaw lossis lwm yam zoo li ntawd. Peb tseem yuav xav tau PHP, Python3 thiab Composer.
- SSH rau hauv koj tus PI thiab ntaus $ sudo nano /etc/dhcpcd.conf
- Kho tus IP tsis zoo li qub
- Reboot koj PI
- Txheeb xyuas seb txhua yam ua haujlwm los ntawm kev ntaus {the_ip_you_chose} hauv qhov chaw nyob ntawm koj tus browser (koj yuav tsum pom nplooj ntawv txais tos ntawm nginx)
Kauj Ruam 2: Nruab Web Framework thiab Kev teeb tsa rau NGiNX
Peb xav kom muaj lub vev xaib peb tuaj yeem nkag tau los ntawm peb lub xov tooj ntawm tes lossis lub browser thiab txhawm rau tshem tawm peb tus kheej ntawm kev sau php/html code yooj yim uas tsis yog thaj tsam ntawm qhov kev qhia no, peb yuav siv PHP moj khaum hu ua Yii2 los tswj cov hauv paus styling thiab styling rau peb.
- Mus rau Yii2 teeb tsa nplooj ntawv thiab siv tus kws sau los nruab nws hauv/var/www/html/teeb-hloov
- Peb yuav tsis pom dab tsi tsuas yog raws li peb tseem tsis tau muab tso rau hauv peb cov ntaub ntawv teeb tsa rau tus neeg rau zaub mov
- Kuv txuas cov ntawv (lub neej ntawd) rau cov kauj ruam no
- Siv nws zoo ib yam nrog cov txheej txheem no lossis saib lwm qhov online yog tias koj xav tau qhov sib txawv tom qab
- Koj yuav tsum muab cov ntawv no tso rau hauv/etc/nginx/sites-available/
- Reload NGiNX nrog $ sudo systemctl rov nginx
- Yog tias qee yam tsis ua haujlwm koj tuaj yeem khiav $ sudo nginx -t kom debug cov ntaub ntawv teeb tsa
Kauj Ruam 3: Teeb tsa Python Cov Ntawv Uas Yuav Sib Tham nrog GPIO
Raws li PHP tsis nyiam ua qhov zoo nrog runtime-type script zoo li GPIO API thiab nab hab sej tsis zoo nrog rau web apps, peb yuav siv txhua tus ntawm lawv hauv lawv cov txiaj ntsig zoo. Txuas nrog cov kauj ruam no koj yuav pom 4 qhov tsim nyog cov nab hab sej ntawv uas cuam tshuam nrog tus pin thiab ua rau lub teeb ci. Muab cov ntawv sau rau txhua qhov chaw koj xav tau, tab sis nco ntsoov lawv qhov chaw raws li peb yuav xav tau nws hauv qib tom ntej thaum peb teeb tsa php sab ntawm yam.
Kauj Ruam 4: Ua tiav ntawm Php Sab Ntawm Yam
Txhua yam peb yuav tsum tau ua yog tshem qee txoj hauv kev tsis raug thiab nplooj ntawv los ntawm cov txheej txheem tseem ceeb thiab ntxiv ob peb kab ntawm txoj cai hauv SiteController ntxiv rau txoj hauv kev tshiab hu ua actionLightswitch (). Tom qab qhov no, nws yuav ua kom cov ntawv sau nab los ntawm cov kauj ruam dhau los uas yuav tig los hais kom ua GPIO pins.
Kauj Ruam 5: Tsim Circuit Court
Vim yog qhov xwm txheej tshwj xeeb ntawm cov qauv xa tawm no (nws hloov pauv thaum txuas nrog GND) peb yuav tsum tsim kom muaj kev sib txuas siv cov transistors. PI tsuas yog qhib lub transistor uas yuav tso cov dej ntws tam sim no los ntawm cov ntaub ntawv xa xov txuas mus rau GND yog li ua rau lub kauj thiab kaw qhov Circuit Court rau lub teeb. Ua raws cov duab hauv cov duab txuas thiab koj yuav zoo mus.
Txog rau ntu tom ntej no, koj yuav tsum tau ceev faj tiag tiag li nws yog lub sijhawm los txuas qhov txuas. Tshem txhua yam ua ntej! Cov relay muaj 3 chaw nres nkoj ib qhov txuas. Peb yuav txuas peb cov cuab yeej siv hluav taws xob mus rau ib nrab thiab ib qho uas qhib lub cim rau nws. Ua tib zoo txuas cov hlua kom nthuav tawm cov tooj liab coj mus thiab tso lawv rau hauv cov chaw hais los saum toj no. Qhov kev txiav txim tsis muaj teeb meem li tam sim no peb tab tom ua haujlwm nrog lwm txoj hauv kev.
Kauj Ruam 6: Xeem Kawg
Txheeb xyuas koj lub Circuit thiab muab tus pin tsawg kawg ob zaug thiab tom qab ntawd txuas PI rau lub zog thiab ntaus {the_chosen_ip} hauv qhov browser qhov chaw nyob bar. Thawj nplooj ntawv yuav muaj ob peb tus tes hloov qhov. Nyem rau lawv thiab saib lub teeb qhib/tua.
Kauj Ruam 7: Tshooj Ntxiv: Qub Tsev Kawm Qub Clapper Trigger
Yuav tsum:
- ib lub usb microphone (nws tsis tas yuav yog qhov zoo tshaj)
- ALSA pob (txheej txheem teeb tsa yuav txawv nyob ntawm koj qhov kev faib khoom)
PyAudio module
Luam cov ntawv nab hab sej txuas nrog thiab ntsaws koj lub microphone. Reboot PI. Ua cov ntawv thiab ua raws li cov lus qhia console. Mus ze ntawm lub mic thiab npuaj teg ob zaug. Koj yuav tsum pom cov npuaj tau sau npe hauv lub console tso tawm thiab yog tias ua tiav, ob lub teeb yuav qhib tom qab 2 vib nas this.
Pom zoo:
10W RGB Sab Nraud Sab Nraud Teeb Teeb Teeb: 5 Kauj Ruam
10W RGB Sab Nraud Sab Nraud Teeb Teeb Teeb: Qhov haujlwm no yog 10W RGB coj teeb rau hmo ntuj, nws tuaj yeem tso rau ntawm koj ib sab thiab muab sijhawm rau koj teeb pom kev zoo. Kuv tau txais kev tshoov siab los ntawm Balad Teeb tam sim no hauv Fab Kis tab sis muaj zog me ntsis (kev lag luam luam tawm txog 3W, kuv li 10W) thiab ntau ntxiv
Teeb Tsom Teeb Thaum Muaj Xwm Ceev Tsis Muaj Roj Teeb: 10 Kauj Ruam
Teeb Tsom Teeb Thaum Muaj Xwm Ceev Tsis Muaj Roj Teeb: Nyob Zoo Txhua Tus, Nov yog Kuv Thawj Cov Lus Qhia, yog li koj cov lus tawm tswv yim yuav pab tau kuv tiag tiag txhawm rau txhim kho ntxiv. Kuj tshawb xyuas kuv tus YouTube channel rau ntau txoj haujlwm.https: //www.youtube.com/channel/UCy7KKu5hVrFcyWw32..Thov hnub no kuv yuav qhia koj
Maus Tail Teeb Nrog Cov Teeb Pom Kev Zoo Siv Lub Teeb LED: 4 Cov Kauj Ruam
Maus Tail Teeb Nrog Cov Teeb Pom Kev Zoo Siv Lub Teeb LEDs: Nyob Zoo! Qhov no yog qee qhov yooj yim DIY ntawm yuav ua li cas thiaj li tsim tau qhov kev cai Programmable RGB Tail Teeb (nrog ua ke ntsais muag/ntsuas ntsuas) rau koj lub maus taus lossis tej zaum muaj ib yam dab tsi siv WS2812B (tus kheej qhov chaw nyob leds) thiab Arduinos . Muaj 4 hom teeb pom kev zoo
DIY LED Teeb - Niaj Hnub Teeb Meem Teeb Nrog Cov Chaw Taws Teeb: 8 Kauj Ruam (nrog Duab)
DIY LED Teeb - Niaj Hnub Teeb Mood Teeb Nrog Chaw Taws Teeb: Hauv kab lus no kuv yuav mus hla cov txheej txheem Kuv tau siv los tsim qhov no zoo heev pyramid zoo li tus LED Mood Teeb.Kuv siv maple rau cov qauv tseem ceeb thiab qee qhov mahogany txhav ntxiv rau lub zog. Rau lub teeb Kuv siv RGB LED teeb uas tuaj nyob hauv 16 ko taw
LED Teeb Teeb Duab Cwjmem: Cov Cuab Yeej rau Teeb Teeb Doodles: 6 Kauj Ruam (nrog Duab)
LED Teeb Teeb Lub Cwjmem: Cov Cuab Yeej rau Teeb Doodles: Kuv tus poj niam Lori yog tus neeg siv tsis tu ncua thiab kuv tau ua si nrog kev yees duab ntev ntev rau ntau xyoo. Kev tshoov siab los ntawm PikaPika pab pawg teeb pom kev zoo thiab yooj yim ntawm cov koob yees duab digital peb tau siv lub teeb duab kos duab kom pom tias peb tuaj yeem ua dab tsi