Cov txheej txheem:
- Kauj Ruam 1: Nruab Qhov Yuav Tsum Muaj Python Libraries
- Kauj ruam 2: Tus nab npawb Code
- Kauj Ruam 3: Tsim Lub Vev Xaib
- Kauj Ruam 4: Hloov Cov Ntaub Ntawv Python rau Koj Beaglebone
- Kauj ruam 5: Khiav Server
- Kauj Ruam 6: Koj Muaj Kev Tswj
Video: Beaglebone Black Web Tswj Siv WebPy: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Puas xav tsim txoj hauv kev los tswj koj lub qhov rooj qhov rooj siv koj lub xov tooj tej zaum sau cov ntaub ntawv thiab saib nws los ntawm koj lub laptop. Muaj ib lub koos pij tawj hu ua Beaglebone Black uas yog lub cuab yeej muaj zog heev uas tso cai rau koj los tswj nws cov GPIO pins txhawm rau cuam tshuam nrog cov khoom hauv ntiaj teb tiag tiag xws li lub cav, LED's, Teeb, thiab lwm yam. Beaglebone zoo ib yam li raspberry pi board tab sis ntau zog dua. Beaglebone zej zog tsis loj npaum li raspberry pi's yog li ceeb toom rau qhov tsis muaj kev qhia.
Raws li kuv tau tshawb nrhiav hauv is taws nem rau kev daws teeb meem los tswj kuv Beaglebone Dub los ntawm kuv lub khoos phis tawj siv lub vev xaib, ntau qhov kev qhia tau tshwm sim siv Beaglebone lub tsev qiv ntawv pob txha thiab lub socket.io tsev qiv ntawv siv huab 9 lub tswv yim. Raws li kuv ua raws cov lus qhia thiab saib cov neeg cov cai Kuv tau ntxhov siab vim qhov tseeb tias huab 9 lub tswv yim khaws cia poob, kuv tsis nkag siab txog javascript thiab tseem tsis muaj qhov hloov pauv ntawm txhua qhov kev qhia (txhua qhov kev qhia yuam koj kom siv tus lej ua ntej PIB). Kuv tau paub txog nab hab sej thiab kuv tus phooj ywg qhia kuv rau web.py uas yog lub vev xaib zoo siv los tsim web apps. Kuv kuj siv Adafruit's Beaglebone Black GPIO lub tsev qiv ntawv los tswj tus kheej tus pin ntawm Beaglebone Dub.
Koj yuav xav tau dab tsi:
- Ib lub computer
- SSH lub davhlau ya nyob twg xws li PuTTY lossis siv SSH ntawm lub davhlau ya nyob twg (Rau Mac's thiab Linux, Windows tsis tau ua hauv SSH)
- Beaglebone Dub txuas nrog lub khoos phis tawj ntawm USB
- Kev siv internet txuas rau Beaglebone Dub
- (xaiv tau) Tus neeg siv SFTP
Kauj Ruam 1: Nruab Qhov Yuav Tsum Muaj Python Libraries
Peb yuav tsum teeb tsa ob lub tsev qiv ntawv uas tsis yog tus qauv txheej txheem hauv nab nab 2.7. Cov tsev qiv ntawv yog Adafruit BBIO thiab WebPy cov tsev qiv ntawv. Peb yuav tsum nkag mus rau Beaglebone siv SSH. Kuv txiav txim siab siv PuTTy lub davhlau ya nyob twg thiab nkag mus siv nws tus IP chaw nyob ntawm beaglebone, kuv li yog 192.168.7.2 koj li tuaj yeem pom ntawm beaglebone start.html. Yog tias koj siv Angstrom hom hauv:
- opkg hloov tshiab && opkg nruab sej-pip sej-setuptools python-smbus
- pip nruab Adafruit_BBIO
- pip nruab web.py
Yog tias koj siv Debian lossis Ubuntu:
- sudo apt-tau hloov tshiab
- sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus -y
- pip nruab Adafruit_BBIO
- pip nruab web.py
Txhawm rau sim yog tias cov tsev qiv ntawv raug teeb tsa kom raug ntaus hauv:
- nab hab sej
- ntshuam web
- ntshuam Adafruit_BBIO. GPIO
Yog tias tsis muaj qhov yuam kev tshwm sim ntawm tus nab hab sej console koj tau teeb tsa lub tsev qiv ntawv kom raug thiab peb tau npaj rau qhov chaws.
Kauj ruam 2: Tus nab npawb Code
Tus nab npawb nab npawb yog qhov yooj yim nkag siab yog tias koj paub siv nab nab, yog tias koj yog tus pib ua haujlwm rau lub program koj yuav muaj qee qhov teeb meem nkag siab ib feem ntawm txoj cai.
Cov ntaub ntawv ntawm 2 lub tsev qiv ntawv tuaj yeem pom ntawm no:
- Web.py ua
- Adafruit GPIO Lub Tsev Qiv Ntawv
Kuv tau sau cov cai thiab tawm tswv yim nws kom koj nkag siab thiab tinker nrog nws.
Kauj Ruam 3: Tsim Lub Vev Xaib
Yog tias koj tus nab npawb nab nab kuv txuas, koj tuaj yeem pom kuv tham txog GET thov. GET thov yog ib txoj hauv kev rau lub vev xaib sib tham nrog tus neeg rau zaub mov. Txhawm rau ntxiv, rho tawm thiab hloov cov txiaj ntsig peb tau siv Jquery ua qee qhov yooj yim tau txais kev thov. Kuv tau txuas ib nplooj ntawv html uas tsuas yog qhov ntawd thiab kuv kuj tau hais tawm cov cai rau koj kom yooj yim.
Cov ntaub ntawv tswj.html nyob ntawm no saib-qhov chaw:
Kauj Ruam 4: Hloov Cov Ntaub Ntawv Python rau Koj Beaglebone
Koj tuaj yeem hloov cov ntaub ntawv main.py ntawm kab hais kom ua tab sis hloov cov ntaub ntawv yooj yim Kuv yuav siv WinSCP (koj tuaj yeem siv ib tus neeg siv sftp) uas koj tuaj yeem rub tawm ntawm no. Muaj Cyberduck rau cov neeg siv mac tab sis txij li thaum kuv yog tus siv PC Kuv tsis paub qhov twg yog qhov zoo tshaj yog li koj yuav tsum google nws. Cov txheej txheem yog yooj yim tsuas yog rub cov ntawv main.py hauv Desktop lossis lwm cov npe uas koj xaiv.
Kauj ruam 5: Khiav Server
Khiav tus neeg rau zaub mov yog yooj yim tsuas yog siv SSH siv PuTTY lossis koj lub davhlau ya nyob twg thiab hloov koj phau ntawv teev npe mus rau cov npe loj.py. Hom hauv:
nab hab sej main.py 1234
Tam sim no yam peb nyuam qhuav tau ua yog nug nab nab los khiav cov ntaub ntawv main.py ntawm chaw nres nkoj 1234
Kauj Ruam 6: Koj Muaj Kev Tswj
Tam sim no mus rau cov ntawv tswj.html thiab qhib nrog google chrome lossis lwm lub browser uas koj siv, koj yuav muaj nplooj ntawv web page nrog 2 lub thawv ntawv thiab 3 khawm. Tus lej tus lej tus lej lub npov nug tus lej tus lej zoo li P8_10 lossis P8_29, thiab lwm yam. Tam sim no koj muaj kev tswj hwm lub vev xaib koj tuaj yeem siv qhov piv txwv no txhawm rau tsim lub vaj huam sib luag zoo dua. Tej zaum siv cov peev txheej peev txheej los siv koj Beaglebone Dub ua cov ntaub ntawv nkag lossis siv nws rau kev siv tshuab hauv tsev, qhov muaj peev xwm muaj qhov kawg. Yog tias koj nyiam cov lus qhia no thov thov pov npav rau txoj haujlwm no ntawm kev sib tw tsim cov npe thiab tseem nyiam txoj haujlwm no. Ua tsaug rau kev nyeem phau ntawv qhia no thiab ua rau hacking!:)
Pom zoo:
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev -- Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: 4 Cov Kauj Ruam
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev || Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: Nov Yog Qhov Tuchless Hloov Rau Cov Khoom Siv Hauv Tsev. Koj Siv Tau Qhov No Mus Rau Txhua Qhov Chaw Hauv Pej Xeem Kom Pab Tau Tawm Tsam Ib Yam Kab Mob. Lub Circuit Court Raws Li Tsaus Sensor Circuit Ua Los Ntawm Op-Amp Thiab LDR. Qhov Tseem Ceeb Thib Ob Ntawm Qhov Circuit Court SR Flip-Flop Nrog Sequencell
Phab Ntsa Mount rau IPad Raws Li Tsev Automation Tswj Vaj Huam Sib Luag, Siv Servo Tswj Cov Hlau nplaum los Qhib Screen: 4 Cov Kauj Ruam (nrog Duab)
Phab Ntsa Mount rau IPad Raws Li Tsev Automation Tswj Vaj Huam Sib Luag, Siv Servo Tswj Cov Hlau nplaum los Qhib Screen: Tsis ntev los no kuv tau siv sijhawm qee lub sijhawm siv khoom hauv thiab ib puag ncig kuv lub tsev. Kuv tab tom siv Domoticz ua kuv daim ntawv thov Tsev Automation, saib www.domoticz.com kom paub meej. Hauv kuv tshawb nrhiav daim ntawv thov daim ntawv qhia uas qhia tag nrho Domoticz cov ntaub ntawv tog
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
Tswj 100 Cov Khoom Siv hauv Ubidots Apps, Cov Koom Haum, Tus Kheej thiab Cov Neeg Siv: 11 Kauj Ruam
Tswj 100 Cov Khoom Siv hauv Ubidots Apps, Cov Koom Haum, Tus Kheej thiab Cov Neeg Siv: Hauv lub sijhawm no kuv tau txiav txim siab los sim qhov ua tau zoo ntawm IoT platform Ubidots rau cov neeg siv kev tswj hwm hauv qhov xwm txheej uas nws muaj ntau yam khoom siv rau ntau lub koom haum lossis tuam txhab nyob hauv tib yam Ubidots platform. Tus kav nroog cov ntaub ntawv: u
Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Cov Neeg Siv Khoom Hloov: 8 Cov Kauj Ruam (nrog Duab)
Kev Tswj Cov Khoom Siv Los Ntawm Arduino Nrog Kev Siv Hluav Taws Xob: Lub Arduino tuaj yeem siv los tswj cov cuab yeej los ntawm kev siv cov khoom siv yooj yim hloov pauv hloov chaw