Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Tau txais API
- Kauj ruam 2: Tsim PHP Script
- Kauj ruam 3: Tsim Php Script
- Kauj Ruam 4: Nkag Siab JSON Script
- Kauj Ruam 5: Nkag Siab PHP Script
- Kauj Ruam 6: Xeem PHP Script
- Kauj Ruam 7: Txuas Ua Ke
- Kauj ruam 8: Uploading Code
- Kauj Ruam 9: Cov txiaj ntsig
Video: Covid-19 Update Tracker Siv ESP8266: 9 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Nov yog txoj haujlwm qhia pom cov ntaub ntawv tam sim no ntawm tus kabmob coronavirus tshwm sim ntawm ntau lub nroog hauv xeev ntawm Is Nrias teb hauv lub sijhawm tiag tiag ntawm OLED zaub. Tus neeg taug qab cov xwm txheej nyob no pab koj saib xyuas lub sijhawm tiag covid-19 hloov tshiab ntawm koj cheeb tsam. Txoj haujlwm no yog ua tiav raws cov ntaub ntawv lub sijhawm tiag tiag los ntawm API. API muab los ntawm covid19india.org.
Khoom siv
- ESP8266-01
- OLED Zaub
- Konvertiere USB in TXL
- Hlau
- Xam Software
Kauj ruam 1: Tau txais API
Rau Is Nrias teb, tau txais api dawb los ntawm tus xa ntawv. Kuv tau txais xeev lub tswv yim api uas xa rov qab json array nrog cov ntaub ntawv ntawm txhua qhov chaw ntawm Is Nrias teb nrog cov lej tseem ceeb peb tuaj yeem nkag mus rau txhua lub nroog ntawm txhua lub xeev ntawm Is Nrias teb.
API Kuv tau txais
Qhov no rov qab json array ntawm lub vev xaib. Tab sis ESP tsis tuaj yeem txiav txim siab qhov no, peb xav tau ntau yam yooj yim json uas tuaj yeem xa mus rau peb qhov tshwj xeeb. Rau qhov tsim cov nplooj ntawv php kom yooj yim rau json array thiab siv tsuas yog cov nroog uas peb xav tau.
Kauj ruam 2: Tsim PHP Script
Rub tawm Xampp software daim ntawv ntawm no
Nruab xampp thiab nyem rau ntawm pib khawm ntawm Apache module.
Kauj ruam 3: Tsim Php Script
Txav mus rau daim nplaub tshev: C: / xampp / htdocs
Nov tsim cov npe nrog txhua lub npe, Kuv tsim ua Covid.
Sab hauv daim nplaub tshev tsim cov ntawv ntawv hloov npe nws txuas ntxiv rau php.
Qhib cov ntawv ntawd hauv ib phau ntawv kho kuv siv Notepad ++.
Tam sim no sau cov cai php no.
<? php cov
$ url = "https://api.covid19india.org/state_district_wise.json";
$ json = file_get_contents ($ url);
$ json = json_decode ($ json, tseeb);
$ amt_conf = $ json ['Maharashtra'] ['districtData'] ['Amravati'] ['paub tseeb'];
$ amt_dead = $ json ['Maharashtra'] ['districtData'] ['Amravati'] ['tuag lawm'];
$ amt_recov = $ json ['Maharashtra'] ['districtData'] ['Amravati'] ['zoo tu qab'];
$ mum_conf = $ json ['Maharashtra'] ['districtData'] ['Mumbai'] ['paub tseeb'];
$ mum_dead = $ json ['Maharashtra'] ['districtData'] ['Mumbai'] ['tuag lawm'];
$ mum_recov = $ json ['Maharashtra'] ['districtData'] ['Mumbai'] ['rov zoo'];
$ ngp_conf = $ json ['Maharashtra'] ['districtData'] ['Nagpur'] ['paub tseeb'];
$ ngp_dead = $ json ['Maharashtra'] ['districtData'] ['Nagpur'] ['tuag lawm'];
$ ngp_recov = $ json ['Maharashtra'] ['districtData'] ['Nagpur'] ['rov zoo'];
$ pune_conf = $ json ['Maharashtra'] ['districtData'] ['Pune'] ['paub tseeb'];
$ pune_dead = $ json ['Maharashtra'] ['districtData'] ['Pune'] ['tuag lawm'];
$ pune_recov = $ json ['Maharashtra'] ['districtData'] ['Pune'] ['rov zoo'];
$ tus nqi = array ("Mumbai" => array ("paub tseeb" => "$ mum_conf", "tuag" => "$ mum_dead", "zoo" => "$ mum_recov"), "Pune" => array ("tau lees paub" => "$ pune_conf", "tuag" => "$ pune_dead", "zoo" => "$ pune_recov"), "Nagpur" => array ("paub tseeb" => "$ ngp_conf", "tuag" => "$ ngp_dead", "zoo" => "$ ngp_recov"), "Amravati" => array ("paub tseeb" => "$ amt_conf", "tuag" => "$ amt_dead", "zoo" => "$ amt_recov"));
$ j = json_encode ($ tus nqi);
echo $ j
?>
Kauj Ruam 4: Nkag Siab JSON Script
Kauj Ruam 5: Nkag Siab PHP Script
Hloov lub xeev thiab lub nroog raws li koj lub npe.
Kauj Ruam 6: Xeem PHP Script
nkag mus rau nplooj ntawv los ntawm browser.
localhost: 8081/Covid/covid.php/
Covid yog npe lub npe
localhost: 8081 Tshem tawm: 8081 yog tias koj xampp siv qhov chaw nres nkoj pib.
Nkag mus rau nplooj ntawv los ntawm lan txuas nrog lub cuab yeej los ntawm kev hloov chaw localhost rau ip chaw nyob ntawm lub pc uas xampp tau khiav.
Kauj Ruam 7: Txuas Ua Ke
Thaum rub tawm cov cai rau esp txuas gpio 0 rau hauv av.
Kauj ruam 8: Uploading Code
Nyeem cov cai ua tib zoo hloov cov ntaub ntawv txhua qhov chaw xav tau.
Txuas gpio0 rau gnd, FTDI rau 3.3v logic.
Hauv Arduino IDE: xaiv generic esp8266, xaiv com chaw nres nkoj thiab nyem upload.
Kauj Ruam 9: Cov txiaj ntsig
Yog! Peb ua tiav nrog peb qhov project.
Txog rau txoj haujlwm no kom ua haujlwm koj yuav tsum tig rau xampp server txhua lub sijhawm yog li yog tias koj xav kom nws ua haujlwm yam tsis muaj pc kom nyob twj ywm qhib, koj tuaj yeem nqa cov kev pabcuam uas koj tso rau nplooj ntawv php thiab hloov ip chaw nyob hauv arduino code rau url ntawm koj hosting. Yog li tam sim no koj tuaj yeem nqa cov ntaub ntawv ncaj qha yam tsis muaj xampp server hauv zos.
Sim nws…. Vam tias koj nyiam nws thiab qhia kuv li cas nws nyob hauv cov lus hauv qab no….
Ua tsaug …
Pom zoo:
Cov Hais Lus Ua Los Ntawm Cov Khoom Siv Rov Los thiab Rov Siv Dua: 6 Cov Kauj Ruam
Cov Hais Lus Ua Los Ntawm Cov Khoom Siv Rov Los thiab Rov Los Siv Rov Los: " Suab paj nruag yog cov lus thoob ntiaj teb ntawm tib neeg. Thiab qhov zoo tshaj plaws-lawv tsis tau them kuv ib dime. Txhua yam nyob rau hauv no pr
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
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)
Kev Siv Xov Tooj Ntawm Lub Xov Tooj Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: Koj puas tau xav tsim qhov kev ua kom txias txias? Yog tias yog, ua li cas txog kev tsim ib qho ntawm cov neeg nyiam tshaj plaws thiab txhua tus nyiam cov khoom siv xws li Lub Xov Tooj Txawb !!!. Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav tsim lub xov tooj txawb yooj yim siv STM li cas
Yooj Yim Cov Chaw Siv Cov Ntaub Ntawv Hauv Chaw Siv Hauv / Arduino / PfodApp: 6 Cov Kauj Ruam
Yooj Yim Cov Ntaub Ntawv Tseem Ceeb Siv Hauv Hauv/Arduino/PfodApp: Rau Plotting Cov Ntaub Ntawv tawm tsam Hnub/Sijhawm siv tsuas yog Arduino's millis () pom qhov qhia no Android mobile thiab ntes nws rau
Kev teeb tsa Matrix LED hauv Cov Khoom Siv Hluav Taws Xob qub - Yuav Tsum Tau Cov Khoom Siv: 3 Cov Kauj Ruam (nrog Duab)
Kev teeb tsa Matrix LED hauv Cov Khoom Siv Hluav Taws Xob qub - Yuav Tsum Tau Siv Cov Khoom Siv: Lub teeb pom kev zoo los ntawm lub Windows PC dhau Bluetooth thiab LED cov txheej txheem nthuav tawm Ib co piv txwv ntawm pixel kos duab thiab cov duab ua haujlwm khiav ntawm LED Cov Ntsiab Lus ntawm PIXEL Guts Kit Hauv Cov Lus Qhia no, peb ' yuav