Cov txheej txheem:
- Kauj ruam 1: Cov ntaub ntawv
- Kauj Ruam 2: Kauj Ruam 1: Teeb Raspberry Pi
- Kauj Ruam 3: Kauj Ruam 2: Teeb Tus Kheej Lub Vev Xaib
- Kauj Ruam 4: Kauj Ruam 3: Tsim Lub Vev Xaib
- Kauj Ruam 5: Kauj Ruam 4: Mount Motor
- Kauj Ruam 6: Kauj Ruam 5: Hlau Pi thiab Tsav
- Kauj Ruam 7: Kauj Ruam 6: Kho Cov Ntawv Sau
- Kauj Ruam 8: Kauj Ruam 7: Xeem Nws
Video: Wifi Teeb Hloov Raspberry Pi Web Server: 8 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Kuv xav tswj lub teeb hloov hauv kuv chav pw yam tsis tau tawm ntawm lub txaj, yog li kuv xav kom tuaj yeem tswj nws los ntawm kuv lub xov tooj. Kuv muaj qee qhov kev txwv ntxiv, Kuv xav kom muaj peev xwm tswj tau nws los ntawm ib qho cuab yeej yooj yim, Kuv xav kom tuaj yeem siv lub teeb pom kev zoo li qub thiab kuv tsis tuaj yeem hloov kho ntau yam kho vajtse raws li kuv xaum chav tsev.
Kuv txiav txim siab siv Raspberry Pi los tswj lub cav servo uas yuav txav mus. Raspberry Pi yuav khiav lub web server uas kuv tuaj yeem nkag tau thaum nyob hauv lub network. Cov kev sib txuas ntawm lub vev xaib ntawm tus neeg rau zaub mov no yuav tso cai rau kuv kom qhib lub qhov hluav taws xob qhib thiab tawm. Los ntawm de-energizing servo ntawm kev hloov pauv kuv kuj tseem tuaj yeem siv lub teeb hluav taws xob li qub.
Kauj ruam 1: Cov ntaub ntawv
Rasperry Pib
Servo Tsav:
smile.amazon.com/gp/product/B0015H2V72/ref…
Hlau Ceev
Jumper Hlau
Kauj Ruam 2: Kauj Ruam 1: Teeb Raspberry Pi
Muaj ntau txoj hauv kev los ua qhov no. Yog tias koj muaj HDMI saib thiab usb keyboard ua ke Kuv xav tias nws yooj yim dua. Txwv tsis pub koj tuaj yeem ua qhov teeb tsa "tsis muaj taub hau".
Nov yog cov lus qhia zoo ntawm kev ua lub taub hau teeb ntawm Windows:
www.circuitbasics.com/raspberry-pi-basics-…
Thiab ib qho rau Mac:
www.circuitbasics.com/raspberry-pi-basics-…
Tab sis qhov yooj yim tshaj plaws yog thauj daim npav SD nrog NOOBS, khau raj pi thaum txuas nrog tus saib xyuas thiab cov keyboard thiab tsuas yog dhau los ntawm kev teeb tsa. Phau ntawv no piav qhia nws zoo heev:
www.circuitbasics.com/raspberry-pi-basics-…
Yog tias koj tsis tau teeb tsa lub taub hau koj tseem yuav tsum tau npaj SSH, nws tsim nyog rau qhov seem no. Txhawm rau ua qhov no kuv siv Putty. Tau nws ntawm no:
www.circuitbasics.com/raspberry-pi-basics-…
Thiab yog tias koj tsis paub koj tus IP chaw nyob tus IP koj tuaj yeem siv IP scanner zoo dua:
Tom qab ntawd tsuas yog nkag mus rau IP chaw nyob rau tus pi hauv kev nkag mus rau Tus Tswv Lub Npe/IP chaw nyob, tawm ntawm qhov chaw nres nkoj ntawm 22 thiab nyem qhib. Koj yuav raug ceeb toom rau tus ID nkag mus.
Kauj Ruam 3: Kauj Ruam 2: Teeb Tus Kheej Lub Vev Xaib
Txhawm rau khiav lub vev xaib kuv siv Apache. Koj tuaj yeem nruab qhov no siv cov lus txib:
sudo apt-tau nruab apache2
Qhov no yuav tsum yog lub hauv paus muab rau koj nplooj ntawv txaws thaum koj mus rau koj tus pi tus IP chaw nyob. Nws yuav tsum zoo li daim duab hauv qab no.
Kauj Ruam 4: Kauj Ruam 3: Tsim Lub Vev Xaib
Koj yuav xav hloov nplooj ntawv tsis zoo nrog koj lub vev xaib uas tuaj yeem tswj hwm lub cav servo. Thawj qhov uas yuav tau hloov yog cov ntawv ntsuas. Koj cov ntaub ntawv ntsuas rau lub vev xaib yuav tsum nyob hauv/var/www/html. Siv koj cov ntawv nyeem nyiam los tsim cov ntawv lossis tsuas yog luam cov ntawv ntawm no siv qee yam xws li winscp. Ntxiv "index.php" hauv qhov chaw no, koj yuav tsum khaws nws li php cov ntaub ntawv koj tus kheej li kuv tsis tuaj yeem tso nws li. Cov ntaub ntawv php no tsim lub vev xaib yooj yim nrog ob qhov txuas, ib qho rau "cgi-bin/off.py" thiab ib qho rau "cgi-bin/on.py". Nov yog ob daim ntawv nab nab uas hloov pauv txoj haujlwm ntawm servo motor.
Python tsab ntawv yuav tsum tau muab tso rau hauv qhov chaw sib txawv rau Apache kom cia lawv khiav. Lawv yuav tsum tau muab tso rau hauv cgi-bin. Nov yog qhov twg cov ntaub ntawv mus yog tias lawv yuav tsum tau khiav hauv Common Gateway Interface uas ua rau cov ntawv sau ntawm pi khiav. Nkag mus rau/usr/lib/cgi-bin thiab ntxiv ob daim ntawv "on.py" thiab "off.py".
Kauj Ruam 5: Kauj Ruam 4: Mount Motor
Kuv pom ib feem zoo los ntawm lwm tus kws tsim khoom los teeb tsa servo xws li nws tuaj yeem tig lub teeb hloov tus qauv. Koj tuaj yeem pom cov ntawv 3d rau nws ntawm no:
github.com/suyashkumar/smart-lights
Qhov no yog rau tus qauv loj servo raws li tau teev tseg hauv ntu ntu. Luam tawm qhov no lossis muab nws luam tawm thiab tom qab ntawd rub nws mus rau koj lub teeb hloov.
Kauj Ruam 6: Kauj Ruam 5: Hlau Pi thiab Tsav
Kuv siv lub pi nrog lub micro usb. Kuv faib tawm lwm micro usb thiab txuas hauv av thiab lub zog rau servo rau qhov no. Kuv qhia cov av nruab nrab ntawm pi thiab servo. Tom qab ntawd kuv txuas tus pin teeb liab rau servo rau GPIO18 ntawm Pi.
Kauj Ruam 7: Kauj Ruam 6: Kho Cov Ntawv Sau
Koj yuav tsum tau ua si ib puag ncig nrog koj teeb tsa me ntsis kom paub seb qhov txiaj ntsig sib xws rau On thiab Off rau koj li cas. Tus Pi tso cai rau koj sau mus rau gpio los ntawm kab hais kom ua siv cov lus txib yooj yim zoo nkauj. los ua gpio 18 pwm pwm siv cov lus txib:
gpio -g mode 18 pwm
tom qab ntawd teeb tsa pwm nrog:
gpio pwm
gpio pwm 192
gpio pwm 2000
Cov no tsuas yog qhov tsim nyog qhov tseem ceeb rau kev teeb tsa pwm zaus. Kev siv tom ntej:
gpio -g pwm 18 120
Qhov twg koj hloov 120 ib puag ncig txhawm rau nrhiav qhov tsim nyog tsim nyog rau txoj haujlwm qhib thiab tawm.
Thaum koj tau pom cov txiaj ntsig tsim nyog rau kev tawm thiab siv cov ntawv sau los hloov cov txiaj ntsig no hauv cov ntawv tshwj xeeb rau ob txoj haujlwm. Qhov chaw kom hloov pauv tau hais meej hauv daim duab.
Kauj Ruam 8: Kauj Ruam 7: Xeem Nws
Mus rau tus IP chaw nyob ntawm tus pi koj yuav tsum pom lub vev xaib nrog qhov txuas rau thiab tawm. Txhua nplooj ntawv tseem yuav muaj qhov txuas rau lwm nplooj ntawv.
Nws yog qhov yooj yim ntxiv qhov luv rau nplooj ntawv no rau koj lub xov tooj ntawm lub vijtsam hauv tsev kom nkag tau yooj yim.
Pom zoo:
DIY Hloov pauv Hloov Lub Rooj Hloov Kho Lub Hwj Huam "Minghe D3806" 0-38V 0-6A: 21 Cov Kauj Ruam (nrog Duab)
DIY Hloov Pauv Hloov Pauv Hloov Kho Lub Hwj Huam "Minghe D3806" 0-38V 0-6A: Ib txoj hauv kev yooj yim tshaj plaws los tsim lub Rooj Tog Zaum Lub Hwj Huam yooj yim yog siv Buck-Boost Converter. Hauv Cov Lus Qhia thiab Yeeb Yaj Kiab Kuv pib tawm nrog LTC3780. Tab sis tom qab kuaj kuv pom LM338 nws muaj nws puas lawm. Luckily kuv muaj ob peb qhov sib txawv
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
Bluetooth Chaw Taws Teeb Tswj Chaw Teeb - Retrofit. Lub Teeb Hloov Tseem Ua Haujlwm, Tsis Muaj Kev Sau Ntawv Ntxiv: 9 Kauj Ruam (nrog Duab)
Bluetooth Chaw Taws Teeb Tswj Kev Teeb - Retrofit. Lub Teeb Hloov Tseem Ua Haujlwm, Tsis Muaj Kev Sau Ntxiv: Hloov Kho Lub Kaum Ib Hlis 25, 2017 - Rau Lub Hwj Chim Siab ntawm qhov haujlwm no uas tuaj yeem tswj tau kilowatts ntawm kev thauj mus los saib Retrofit BLE Kev Tswj rau Kev Siv Lub Hwj Chim Siab - Tsis Xav Tau Ntxiv Ntxiv Qee cov BLE cov laug cam / software sib sau ua ke
Hloov iPhone 6 Ntxiv Roj Teeb: Qhia Hloov Lub Roj Teeb Sab Hauv: 12 Cov Kauj Ruam (nrog Duab)
Hloov iPhone 6 Ntxiv Roj Teeb: Qhia Hloov Lub Roj Teeb Sab Hauv: Hav cov neeg, Kuv tau ua iPhone 6 hloov roj teeb qhia qee lub sijhawm dhau los thiab nws zoo li tau pab ntau tus neeg yog li ntawm no yog phau ntawv qhia rau iPhone 6+. IPhone 6 thiab 6+ muaj qhov tseem ceeb tib yam tsim tshwj rau qhov sib txawv qhov loj me. Muaj
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