Cov txheej txheem:
- Kauj ruam 1: Kho vajtse
- Kauj Ruam 2: Cov Khoom Ua Haujlwm Li Cas
- Kauj Ruam 3: I2C Module Execution Process in Arduino IDE
- Kauj Ruam 4: ESP8266 Kev Txuas Nrog WiFi thiab Google Daim Ntawv Qhia
- Kauj Ruam 5: Siv Google Daim Ntawv Siv GScript Editor
- Kauj Ruam 6: Txwv:
- Kauj Ruam 7: Txoj Cai, Khab nias, Siv
Video: Cov Ntaub Ntawv Huab Cua Siv Google Ntawv thiab Google Tsab Ntawv: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Hauv Blogtut no, peb yuav xa cov nyeem ntawm SHT25 sensor mus rau google nplooj ntawv siv Adafruit huzzah ESP8266 uas pab xa cov ntaub ntawv mus rau internet.
- Kev xa cov ntaub ntawv mus rau google daim ntawv xov tooj ntawm tes yog qhov muaj txiaj ntsig thiab txoj hauv kev yooj yim uas txuag cov ntaub ntawv hauv daim ntawv teev npe online.
- Hloov chaw siv yam tshwj xeeb tshwj xeeb zoo li thawb lub thawv lossis MQTT NODE RED lossis lwm yam REST API, peb yuav xa cov ntaub ntawv los ntawm kev siv google tsab ntawv uas yooj yim tau txais cov ntaub ntawv los ntawm lub sensor los ntawm kev siv tsab ntawv txuas los ntawm google tsab ntawv thov tom qab tshaj tawm
- Peb tuaj yeem siv cov ntawv sau xa cov ntaub ntawv los ntawm google daim ntawv, cov ntawv lossis txawm tias mus rau google tsav.
- Tsuas yog tsis xaus ntawm no ntxiv koj tuaj yeem txuas Google nplooj ntawv nrog ib daim ntawv thov web-based uas sib qhia cov ntaub ntawv nrog cov neeg siv raws li lawv xav tau
- Tsis muaj nqi ntxiv uas yuav tsum tau them tsis zoo li lwm cov servers hauv online ntawm no thiab koj tuaj yeem khaws cov ntaub ntawv mus txog 10 GB Siab kawg hauv tus neeg siv nyiaj thiab siv tau
- Ib qho ntawm kev siv zog zoo tshaj plaws yog koj tuaj yeem kawm txog kev txuas cov ntaub ntawv rau hauv internet nrog rau qhov kev thov ntawm lub sijhawm tiag tiag yooj yim.
- Peb yuav siv I2C kev sib txuas uas ua tus tswv-qhev tus txheej txheem los qhia cov ntaub ntawv nrog google nplooj ntawv hauv txoj kev hloov pauv tau.
- I2C cov txheej txheem txheej txheem sib txuas cov cuab yeej sensor thiab ua haujlwm nrog ib puag ncig 256 lub cim nyob rau ib lub sijhawm los ntawm kev siv tsuas yog 2 xaim rub tawm kom hloov cov ntaub ntawv sensor hauv 8 khoom kho vajtse
Kauj ruam 1: Kho vajtse
Adafruit Feather HUZZAH Cov Khoom Siv
Adafruit Feather Huzzah Board
Adafruit I2C koom ua ke thiab USB adapter
SHT25 Kub thiab Vaum Sensor
I2C Kab
Kauj Ruam 2: Cov Khoom Ua Haujlwm Li Cas
Nqa cov nyeem ntawm cov ntaub ntawv ntawm lub sijhawm tiag tiag ntawm cov ntsuas hluav taws xob los ntawm ESP8266 thiab xa cov ntaub ntawv mus rau huab sib txawv platform yog yooj yim dua.
Peb yuav siv Wire.h lub tsev qiv ntawv hauv Arduino IDE los tsim ob txoj kev sib txuas lus ntawm Adafruit Huzzah Board thiab SHT25 sensor I2C module thiab I2C cable.
Nco tseg: Txhawm rau zam kev teeb tsa txoj kab hluav taws xob nyuaj, kuv yuav siv I2C adapter rau Adafruit Huzzah tsim los txuas I2C sensor.
Rau tus tshiab kom teeb tsa Esp8266 yo yuav tsum dhau los ntawm ESP8266 teeb tsa
Thawj zaug pib lub tsev qiv ntawv:
- Hlau tsev qiv ntawv
- ESP8266WiFi
- WiFiClientSecure
Kauj Ruam 3: I2C Module Execution Process in Arduino IDE
Tom qab pib ua cov tsev qiv ntawv, peb yuav txiav txim siab txheej txheem I2C kom siv los nqa lub ntsuas nyeem ntawv hloov pauv lawv thiab hloov pauv 8 cov ntaub ntawv raws li qhov xav tau:
Pib sau npe hauv ob txoj kab hlau I2C raws tu qauv rau I2C sensor module
#define Ntxiv 0x40
- Pib I2C kis thiab pib sau npe thiab thov rau 2 bytes cov ntaub ntawv los ntawm qhov uas peb yuav nyeem cov ntaub ntawv ntsuas.
- Yog tias 2 bytes cov ntaub ntawv yuav muaj tom qab ntawd nyeem cov ntaub ntawv ntsuas thiab siv hais hauv qab no cov qauv peb tab tom hloov pauv qhov txiaj ntsig xav tau
float humidity = (((data [0] * 256.0 + data [1]) * 125.0) / 65536.0) - 6;
ntab cTemp = (((data [0] * 256.0 + data [1]) * 175.72) / 65536.0) - 46.85;
ntab fTemp = (cTemp * 1.8) + 32;
Luam qhov tseem ceeb hauv lub vijtsam saib ua ntej
Kauj Ruam 4: ESP8266 Kev Txuas Nrog WiFi thiab Google Daim Ntawv Qhia
Tom qab ua tiav I2C cov qauv peb yuav kawm paub yuav ua li cas nqa cov ntaub ntawv thiab los ntawm kev siv WiFi cov tsev qiv ntawv thiab tus tswv tsev tus lej nrog rau cov lej API kom xa cov ntaub ntawv mus rau Google nplooj ntawv.
- Txhais WiFi cov ntaub ntawv pov thawj thoob ntiaj teb hauv ESP8266 uas yuav pab peb txuas lub rooj tsavxwm nrog internet
- Raws li peb tab tom siv HTTP tus thov thiab yuav txhais HTTPS = 443 raws tu qauv kom ruaj ntseg txoj hauv kev HTTP raws li tsab ntawv yuav ua haujlwm nyob hauv txoj kev nyab xeeb nkaus xwb.
- Pib lub tswv yim cov ntsiab lus hauv cov cai
const char* host = "script.google.com";
ua int httpsPort = 443;
Txoj hlua SCRIPT_ID = "hais qhia tus lej ID raws li tau hais hauv snaps";
Nco tseg: Tsab ntawv ID tau hais hauv "web apps URL" thaum Gscript code yuav tshaj tawm, tsuas yog luam thiab muab tus lej hais hauv qab no thiab pib ua ntej hauv cov lus txib saum toj no
- Tsis tas li siv qhov hloov pauv nrog qhov sib txawv, peb tab tom yuav pib ua qhov sib txawv thoob ntiaj teb uas nqa cov ntaub ntawv los ntawm I2C module thiab xa nws mus rau kab ntawv URL uas yuav txuas ntxiv xa cov ntaub ntawv mus rau qhov chaw.
- Siv ESP8266 WiFi Lub Tsev Qiv Ntawv peb yuav tuaj yeem txuas lub rooj tsavxwm nrog internet
-
Cov ntaub ntawv ntsuas yuav tau tuav rau lub server hauv ib cheeb tsam tom qab txhua 5 vib nas this.
- Nrog kev pab los ntawm tsab ntawv URL, cov ntaub ntawv yuav raug tuav rau google tsab ntawv tshaj tawm txuas txuas Nplooj ntawv nquag tom qab txhua 15 vib nas this.
Kauj Ruam 5: Siv Google Daim Ntawv Siv GScript Editor
Raws li peb txhua tus muaj tus lej google txhawm rau nkag mus rau hauv google daim ntawv nrog koj tus lej nyiaj
- Hais txog qhov tseem ceeb uas koj xav tau los ntawm lub ntsuas hluav taws xob txuas nrog ESP8266
- Mus rau Cov Cuab Yeej> Script Editor
- Siv "Doget" ua haujlwm kom tau txais cov xwm txheej
- Hauv "Doget" ua haujlwm rau pib daim ntawv nthuav qhia API tus lej zoo li txuas rau Daim Ntawv Cuam Tshuam uas koj xav xa qhov ntsuas qhov ntsuas.
- Nrog kev pab ntawm kev siv lub tshuab ua haujlwm kom hais hauv cov cai los sawv cev rau cov ntaub ntawv hauv kab thiab kab ntawv yooj yim.
- Thaum kawg, khaws cov ntaub ntawv thiab nyem rau "Publish" >> Nyem "Deploy as web apps"
- Nco ntsoov tias thaum twg los xij yuav muaj kev hloov pauv los xaiv "qhov project version" >> "New" >> nias "update"
Tam sim no lub web app URL yuav tshwm raws li hauv qab no:
script.google.com/macros/s/ "GSGS ID "/exec:
siv ntxiv hauv ESP8266 txoj cai rau nqa cov ntaub ntawv los ntawm cov ntsuas
Peb tab tom yuav siv HTTPS Tau thov kom txuas cov ntaub ntawv mus rau tus tswv tsev tus lej tau hais hauv gscript tus kws kho qhov chaw uas peb sau peb cov ntaub ntawv txuas ntxiv txuas nrog google daim ntawv.
muaj nuj nqi doGet (e) {Logger.log (JSON.stringify (e)); // saib qhov tsis sib xws tshwm sim = 'Ok'; // xav tias ua tiav yog (e.parameter == 'undefined') {tshwm = 'Tsis muaj Parameters'; } lwm {var sheet_id = ''; // Spreadsheet ID var sheet = SpreadsheetApp.openById (sheet_id).getActiveSheet (); var newRow = sheet.getLastRow () + 1; var rowData = ; } Logger.log (JSON.stringify (rowData)); // Sau kab tshiab hauv qab no var newRange = sheet.getRange (newRow, 1, 1, rowData.length); newRange.setValues ([rowData]); }
Kauj Ruam 6: Txwv:
- Txoj haujlwm no tsuas yog txwv kom khaws cov ntaub ntawv ntawm I2C sensor hauv google nplooj ntawv
- Peb tab tom siv HTTPS GET thov kom tau txais qhov txiaj ntsig los ntawm I2C cov haujlwm
- Peb yuav tsum hloov pauv tus nqi hauv txoj hlua thiab tom qab ntawd xa cov ntaub ntawv mus rau gscript URL txuas.
Kauj Ruam 7: Txoj Cai, Khab nias, Siv
Github Code:
github.com/varul29/SHT25_GoogleSheets_Goog…
Siv
I2C Code:
Google Script Tutorial:
Embedded Store:
Tutorial Blog:
Pom zoo:
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): 3 Cov Kauj Ruam
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): Peb txhua tus nyiam ua si nrog peb tus lej L … cov ntsiab lus tau ntxiv thiab nws tsis tshwj xeeb rau lub qhov muag. Arduino IDE cov phiaj xwm tsis
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card - DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: 5 Cov Kauj Ruam
Yuav Ua Li Cas Vaum Thiab Kub Tiag Tiag Cov Ntaub Ntawv Teev Npe Nrog Arduino UNO thiab SD-Card | DHT11 Cov ntaub ntawv-logger Simulation hauv Proteus: Taw qhia: nyob zoo, qhov no yog Liono Maker, ntawm no yog YouTube txuas. Peb tab tom tsim txoj haujlwm muaj tswv yim nrog Arduino thiab ua haujlwm ntawm cov kab ke. Cov ntaub ntawv-Logger: Cov ntaub ntawv logger (tseem cov ntaub ntawv-logger lossis cov ntaub ntawv kaw) yog cov cuab yeej siv hluav taws xob uas sau cov ntaub ntawv dhau sijhawm
Qhov kawg Qhov Siab Tshaj Plaws Huab Cua Huab Cua Cov Ntaub Ntawv Logger: 9 Kauj Ruam (nrog Duab)
Qhov kawg High Altitude Weather Balloon Data Logger: Sau cov ntaub ntawv huab cua huab cua siab nrog qhov kawg qhov siab tshaj plaws huab cua zais zais cov ntaub ntawv logger. Lub zais pa huab cua siab, tseem hu ua lub zais pa siab lossis HAB, yog lub zais pa loj loj uas muaj cov helium. Cov balloons no yog lub platform
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
IoT Ua Yooj Yim: Txheeb Xyuas Cov Ntaub Ntawv Huab Cua Tej Zaum: UV thiab Huab Cua Kub & Vaum: 7 Kauj Ruam
IoT Ua Yooj Yim: Txheeb Xyuas Cov Ntaub Ntawv Huab Cua Nyob deb: UV thiab Huab Cua Kub & Vaum: Ntawm qhov kev qhia no, peb yuav ntes cov ntaub ntawv nyob deb li UV (Ultra-Violet hluav taws xob), huab cua kub thiab av noo. Cov ntaub ntawv no yuav yog ib qho tseem ceeb heev thiab yuav siv rau yav tom ntej Chaw Ua Haujlwm Huab Cua.Qhov thaiv daim duab qhia tau tias peb yuav tau txais dab tsi thaum kawg