Cov txheej txheem:
- Kauj Ruam 1: Lub Tsev Qiv Ntawv yog dab tsi?
- Kauj Ruam 2: Cov Tsev Qiv Ntawv thiab Cov Ntaub Ntawv
- Kauj ruam 3: Header File
- Kauj Ruam 4: Qhov Chaw Cov Ntaub Ntawv
- Kauj Ruam 5: Muab Piv Txwv Sketches
- Kauj Ruam 6: Tshaj Tawm rau Tus Thawj Saib Xyuas Tsev Qiv Ntawv
- Kauj Ruam 7: Cov Kauj Ruam Tom ntej
Video: Ua Tsev Kawm Ntawv Arduino rau YouTube Pom: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Nyob Zoo Sawv Daws, Tsis ntev los no kuv tau tsim cov kev pabcuam hu ua YouTube Sight uas tuaj yeem rho tawm cov neeg siv cov ntaub ntawv los ntawm YouTube Analytics API thiab muab rau koj kom raug cov neeg siv suav txij li YouTube pib sau cov txiaj ntsig. Nrog nws, Kuv tau tsim tus qauv piv txwv tab sis kuv kuj xav ua Arduino lub tsev qiv ntawv kom tib neeg tuaj yeem siv tau yooj yim dua.
Kauj Ruam 1: Lub Tsev Qiv Ntawv yog dab tsi?
Lub tsev qiv ntawv yog ib feem ntawm cov cai uas tuaj yeem ua haujlwm tshwj xeeb, txheej txheem hom ntaub ntawv lossis tuaj yeem paub yuav cuam tshuam nrog cov khoom siv tshwj xeeb. Lawv tso cai rau peb kom yooj yim txuas ntxiv Arduino ib puag ncig thiab muaj ntau ntawm lawv uas tuaj ua ntej teeb tsa nrog Arduino IDE.
Hauv cov xwm txheej zoo li kuv, qhov uas peb xav ntxiv qhov muaj peev xwm tshiab rau Arduino, peb tuaj yeem tsim peb tus kheej lub tsev qiv ntawv rau lwm tus neeg siv lawv. Txhua lub tsev qiv ntawv teeb tsa nyob hauv ib daim nplaub tshev tshwj xeeb ntawm peb lub khoos phis tawj. Hauv kuv qhov xwm txheej rau Windows PC, cov tsev qiv ntawv nyob hauv qab Cov Ntaub Ntawv/Arduino. Txoj hauv kev tag nrho yuav tshwj xeeb rau koj, raws li koj lub npe siv.
Kauj Ruam 2: Cov Tsev Qiv Ntawv thiab Cov Ntaub Ntawv
Txhawm rau pib tsim peb lub tsev qiv ntawv, thawj zaug peb yuav tsum tsim daim nplaub tshev ntawm no nrog lub npe ntawm nws yog li kuv tau tsim daim nplaub tshev hu ua YouTube Sight. Hauv qhov tsawg kawg nkaus version ntawm lub tsev qiv ntawv, peb yuav tsum muaj tsawg kawg yog ob daim ntawv.
Thawj qhov yog qhov hu ua "header" cov ntaub ntawv uas muaj tag nrho cov lus txhais ntawm cov txheej txheem thiab cov khoom uas peb lub tsev qiv ntawv muab, thiab qhov thib ob yog cov ntaub ntawv uas yuav suav nrog txhua qhov chaws.
Cov ntaub ntawv header muaj qhov txuas ntxiv ntawm ".h" thaum cov ntaub ntawv muaj qhov txuas ntxiv ntawm ".cpp" thiab feem ntau lawv muaj lub npe ntawm lub tsev qiv ntawv raws li lub npe. Hauv kuv qhov xwm txheej, ob daim ntawv hu ua "YouTubeSight.h" thiab "YouTubeSight.cpp".
Cov txheej txheem ntawm kev sau cov ntawv qiv ntawv tuaj yeem ua rau nyuaj siab thiab nyuaj siab, tshwj xeeb tshaj yog thaum koj sau lub tsev qiv ntawv thawj zaug, tab sis nrog ntau qhov kev sim thiab ua yuam kev, koj tuaj yeem ua tiav cov txiaj ntsig xav tau. Vim li ntawd kuv yuav coj koj mus txog qhov ua tiav ntawm ob daim ntawv thiab piav qhia nws.
Tag nrho cov cai thiab lub tsev qiv ntawv muaj rau rub tawm los ntawm GitHub ntawm qhov txuas hauv qab no:
Kauj ruam 3: Header File
Sab hauv cov ntawv header, thaum pib, tag nrho cov ntaub ntawv tau qhwv hauv ib qho "ifndef" nqe lus uas tshuaj xyuas yog tias qhov sib txawv tau teev tseg tau teev tseg lossis tsis yog. Qhov no yuav tiv thaiv kev ua yuam kev rau txhua tus neeg uas siv lub tsev qiv ntawv yog tias lawv suav nrog nws ob zaug hauv tib daim duab los ntawm qhov ua yuam kev.
Tom ntej no, peb yuav tsum suav nrog lub hauv paus Arduino tsev qiv ntawv thiab txij li peb yuav ua haujlwm nrog HTTP tus neeg siv khoom ntawm qee yam xa hauv qhov kev thov mus rau YouTube Pom Peb tseem yuav suav nrog lub hauv paus Cov Tsev qiv ntawv.
Ua ntej peb pib sau cov ntsiab lus ntawm peb chav kawm tseem ceeb, peb yuav tsum txheeb xyuas ib qho kev hloov pauv zoo li qub thiab teeb tsa uas peb tsis xav hloov kho. Hauv kuv qhov xwm txheej, muaj ob qhov kev hloov pauv zoo li no. Lub ntsiab URL ntawm YouTube Sight cov kev pabcuam thiab lub sijhawm sib txawv uas peb yuav siv los tshuaj xyuas seb peb nyeem tus nqi ntev npaum li cas.
Tsis tas li hauv ntu no, peb tuaj yeem txheeb xyuas txhua hom kev cai uas peb xav siv zoo li cov qauv no channelStatistics uas peb yuav khaws cov txiaj ntsig rau.
Kev txhais cov qauv hauv chav kawm tau muab faib ua ob ntu. Thawj ntu yog lub ntsiab lus ntawm txhua qhov kev ua haujlwm rau pej xeem thiab thaj chaw thiab thib ob yog lub ntsiab lus ntawm txhua txoj haujlwm ntiag tug thiab cov khoom ntiag tug. Qhov sib txawv ntawm ob qho tib si yog qhov kawg-cov neeg siv ntawm peb lub tsev qiv ntawv yuav tsis tuaj yeem siv dab tsi los ntawm ntu ntiag tug ncaj qha thaum lawv yuav tuaj yeem hloov kho ncaj qha thiab siv ib qho ntawm cov khoom thiab kev ua haujlwm los ntawm cov pej xeem.
Hauv seem pej xeem, peb piav qhia tus tsim chav kawm, channelStats sib txawv qhov twg peb yuav khaws cov txiaj ntsig, kev ua haujlwm uas yuav tau txais cov ntaub ntawv thiab debug cuab yeej uas tom qab peb tuaj yeem siv los tshuaj xyuas cov xwm txheej uas peb yuav tsis tau txais qhov txiaj ntsig xav tau.
Txog cov khoom ntiag tug, peb yuav txiav txim siab ib qho rau khaws cia cov channel GUID, tus taw tes rau HTTP tus neeg siv khoom peb yuav siv thiab ua haujlwm uas yuav faib cov hlua rov qab los ntawm YouTube Pom.
Kauj Ruam 4: Qhov Chaw Cov Ntaub Ntawv
Tam sim no cia saib mus rau qhov ua tiav ntawm txhua qhov no hauv cov ntaub ntawv qhov chaw.
Thawj kauj ruam rau peb yog suav nrog peb tus kheej cov ntaub ntawv header uas peb nyuam qhuav tsim thiab tom qab ntawd peb yuav tsum tau txheeb xyuas tus tsim lub tsev qiv ntawv. Hauv nws, peb hla ob qhov sib txawv. GUID tau txais kev cawmdim rau hauv tus kheej qhov sib txawv uas peb tau hais ua ntej thiab Tus Neeg Siv khoom tau dhau los ntawm kev siv yog li peb tuaj yeem hu tib qho piv txwv uas peb tau txais.
Lub luag haujlwm getData tseem ceeb ntawm lub tsev qiv ntawv tau piav qhia tom ntej los ntawm thawj qhov tshwj xeeb hom rov qab, tom qab ntawd los ntawm lub tsev qiv ntawv lub npe thiab lub luag haujlwm. Kuv yuav tsis piav qhia meej txog txhua kab ib leeg ua dab tsi hauv txoj haujlwm no, tab sis feem ntau, txoj haujlwm qhib kev sib txuas rau YouTube Sight server, xa hauv qhov kev thov kom tau txais cov txheeb cais thiab tom qab ntawd txheeb xyuas cov ntaub ntawv xa rov qab nrog kev pab los ntawm ntiag tug getValue muaj nuj nqi.
Cov txiaj ntsig tau txais rov qab yog tom qab teeb tsa rau channelStats sib txawv thiab qhov ntsuas tau rov qab yog tias peb ua tiav los khaws cov txiaj ntsig lossis tsis yog thiab nrog qhov tseem ceeb ntawm peb lub tsev qiv ntawv tau ua tiav.
Kauj Ruam 5: Muab Piv Txwv Sketches
Feem ntau koj, txhua lub tsev qiv ntawv muab piv txwv uas koj tuaj yeem thauj khoom sai thiab siv los ua yeeb yam tias lub tsev qiv ntawv tuaj yeem ua dab tsi thiab yuav ua li cas. Txhawm rau muab cov piv txwv zoo li no, peb yuav tsum hloov kho lub tsev qiv ntawv cov qauv uas tam sim no lub taub hau thiab cov ntaub ntawv yuav nyob hauv "src" nplaub tshev thiab daim nplaub tshev tshiab yuav raug ntxiv hauv qab lub tsev qiv ntawv hauv paus hu ua "piv txwv".
Ib qho Arduino kos duab uas koj tso rau hauv daim nplaub tshev no yuav tau txais los ntawm Arduino IDE ua piv txwv rau koj lub tsev qiv ntawv thiab tib neeg tuaj yeem tshawb xyuas nws sai thiab kawm paub tias lub tsev qiv ntawv ua haujlwm li cas.
Kauj Ruam 6: Tshaj Tawm rau Tus Thawj Saib Xyuas Tsev Qiv Ntawv
Txhawm rau siv lub tsev qiv ntawv, tib neeg yuav tsum suav nrog cov ntawv hauv paus ntawm koj lub tsev qiv ntawv hauv lawv daim duab thiab Arduino IDE yuav tsim nws ua ke nrog nws. Tab sis txhawm rau ua li ntawd, thawj zaug lawv yuav tsum tau nruab nws ntawm lawv lub tshuab.
Ib txoj hauv kev yog rub tawm lub tsev qiv ntawv los ntawm GitHub thiab teeb tsa nws los ntawm ZIP installer hauv IDE lossis yooj yim muab nws tso rau hauv cov ntawv tais ceev tseg raws li peb tau ua thaum peb tau tsim nws. Txawm li cas los xij, Arduino IDE tseem suav nrog cov cuab yeej, hu ua Tus Thawj Saib Xyuas Tsev Qiv Ntawv uas tso cai rau koj tshawb nrhiav lub tsev qiv ntawv ncaj qha los ntawm IDE.
Txhawm rau suav nrog koj lub tsev qiv ntawv hauv nws, peb thawj zaug yuav tsum tsim cov ntaub ntawv ntxiv hauv lub hauv paus nplaub tshev hu ua "library.properties" thiab hauv nws, peb yuav tsum qhia lub npe tsev qiv ntawv, cov ntawv tam sim no thiab qee cov ntaub ntawv ntxiv uas yuav pab tus thawj tswj tsev qiv ntawv. kom pom cov ntaub ntawv zoo dua txog nws.
Nrog rau cov ntaub ntawv nyob hauv qhov chaw, teeb meem xav tau tsim ntawm Arduino GitHub nplooj ntawv uas yooj yim nug koj lub tsev qiv ntawv kom suav nrog hauv qhov ntsuas nrog qhov txuas rau nws thiab thaum nws tau pom zoo thiab ntxiv los ntawm Arduino cov neeg ua haujlwm, Tus Thawj Saib Xyuas Tsev Kawm Ntawv yuav pib muab koj lub tsev qiv ntawv hauv cov txiaj ntsig. Ib qho ntxiv, tus thawj tswj hwm yuav saib xyuas ib qho cim npe hauv GitHub repo yav tom ntej thiab muab kev hloov tshiab rau tib neeg siv nws thaum muaj kev hloov pauv.
Kauj Ruam 7: Cov Kauj Ruam Tom ntej
Kuv vam tias tom qab Cov Lus Qhia no, koj muaj kev nkag siab zoo ntawm yuav ua li cas Arduino cov tsev qiv ntawv ua haujlwm, yuav ua li cas koj tuaj yeem tsim ib qho thiab tseem ceeb tshaj plaws, Kuv vam tias koj tau txais kev tshoov siab kom pib ua haujlwm ntawm koj lub tswv yim loj tom ntej.
Rau ib qho lus nug ntxiv lossis lus pom zoo sau rau hauv cov lus, sau npe rau kuv tus YouTube channel thiab ua raws kuv ntawm no ntawm Cov Lus Qhia.
Pom zoo:
Plug & Ua Si CO2 Sensor Zaub Nrog NodeMCU/ESP8266 rau Cov Tsev Kawm Ntawv, Tsev Kawm Qib Siab lossis Koj Lub Tsev: 7 Kauj Ruam
Plug & Ua Si CO2 Sensor Zaub Nrog NodeMCU/ESP8266 rau Cov Tsev Kawm Ntawv, Lub Tsev Kawm Qib Siab lossis Koj Lub Tsev: Kuv yuav qhia koj sai npaum li cas txhim kho lub plug & ua si CO2 sensor qhov twg txhua qhov ntawm txoj haujlwm yuav txuas nrog DuPont xov hlau. Yuav muaj tsuas yog 5 cov ntsiab lus uas yuav tsum tau muab siv, vim tias kuv tsis tau muab tshuaj txhuam ua ntej qhov haujlwm no txhua lub sijhawm
Tsev Kawm Ntawv Nroog Tsev Kawm Ntawv Chaw Nres Tsheb Daim Ntawv Qhia: 7 Kauj Ruam (nrog Duab)
University Campus Student Parking Map: Ntau tus tub ntxhais kawm xav paub tias lawv tuaj yeem nres tsheb hauv lub tsev kawm ntawv qib siab li cas. Txhawm rau daws qhov teeb meem no, Kuv tsim daim duab qhia chaw nres tsheb ntawm thaj chaw tseem ceeb ntawm Utah State University lub tsev kawm ntawv. Daim duab qhia chaw yog rau cov tub ntxhais kawm kom nrawm nrawm saib seb qhov chaw nres tsheb twg yog
KEV TSHAWB TSEV KAWM NTAWV HAUV TSEV KAWM NTAWV (Tswj koj cov ntawv thov los ntawm ib tus neeg thoob ntiaj teb): 5 Kauj Ruam
KEV HLOOV TSHIAB (tswj koj cov ntawv thov los ntawm ib lub koom haum thoob ntiaj teb): Hauv cov lus qhia no kuv tau qhia yuav ua li cas koj tuaj yeem siv ESP8266 los tswj cov cuab yeej AC xws li Teeb, kiv cua, thiab lwm yam los ntawm thoob plaws ntiaj teb hauv Is Taws Nem ntawm Blynk app yog tias koj yog tshiab rau ESP8266 nco ntsoov txheeb xyuas cov lus qhia no:-Pib Pib Nrog NodeM
HAUJ LWM HAUV TSEV KAWM NTAWV NTAWV TSEV KAWM NTAWV MARKUP LANGUAGE (AIML) VIA NOTEPAD: 8 Kauj Ruam
HAUJ LWM HAUV TSEV KAWM NTAWV HAUV TSEV KAWM NTAWV MARKUP LANGUAGE (AIML) VIA NOTEPAD: Artificial Intelligence Markup Language (AIML) yog hom lus programming uas yog Extensible Markup Language (XML) kev qhia siv los ntawm chatbot, verbot, pandorabot, superbot, thiab lwm yam neeg tham. Nws tau tsim los ntawm Dr. Richard Wallace thiab € € ¦
Taw qhia rau Robotics rau Cov Tub Kawm Ntawv Hauv Tsev Kawm Ntawv Nrog Hummingbird Controllers: 18 Cov Kauj Ruam
Taw qhia rau Robotics rau Cov Tub Ntxhais Kawm Hauv Tsev Kawm Ntawv Nrog Hummingbird Controllers: Feem ntau cov cuab yeej neeg hlau ntawm kev ua lag luam niaj hnub no xav kom tus neeg siv rub tawm cov software tshwj xeeb rau hauv lawv lub hard drive. Qhov zoo nkauj ntawm Hummingbird Robotic Controller yog qhov nws tuaj yeem ua haujlwm siv lub vev xaib hauv computer, xws li chromebook. Nws tseem yog