Cov txheej txheem:

Coronavirus Case Counter - ESP32: 4 Cov Kauj Ruam
Coronavirus Case Counter - ESP32: 4 Cov Kauj Ruam

Video: Coronavirus Case Counter - ESP32: 4 Cov Kauj Ruam

Video: Coronavirus Case Counter - ESP32: 4 Cov Kauj Ruam
Video: 001 - Internet of Things Live COVID-19 Counter 2024, Kaum ib hlis
Anonim
Coronavirus Case Counter - ESP32
Coronavirus Case Counter - ESP32

Nrog kev kis mob kis thoob qhov txhia chaw tsis ntev los no, Kuv txiav txim siab sau cov ntawv taug kev ntawm tus kabmob coronavirus hauv phau ntawv muag khoom. Tab sis ib qho ntawm cov teeb meem kuv tau ntsib yog tau raug thiab cov lej tsis ntev los no rau kev kis tus kab mob. Thaum qhov kev kaw nkag pib, kuv txiv tau yuav kuv ESP - 32 pawg thawj coj, thiab yog li kuv tau kawm txog kev siv nws, Kuv txiav txim siab los daws qhov teeb meem rau kuv.

Kuv tau tsim qhov program uas siv cov ntaub ntawv hais txog kev kis mob thoob ntiaj teb los ntawm https://github.com/NovelCOVID/API("source ") thiab tom qab ntawd qhia nws ntawm 0.96" OLED. Yog li, kuv yuav sib koom cov cai thiab teeb tsa koj, nrog rau kev qhia koj tias txoj cai ua haujlwm li cas.

Kuv tau siv ESP-32 DOIT DEVKIT V1 pawg thawj coj, tab sis koj tuaj yeem siv txhua lub rooj tsav xwm nrog Wi-nkaus muaj peev xwm.

Khoom siv

Qhov tseem ceeb:

USB rau micro-USB cable

ESP-32 Pawg Thawj Coj (ib qho, kuv yog DOIT DEVKIT V1)

OLED zaub - 0.96 nti (128 x 64 pixels)

4 poj niam rau poj niam jumper xov hlau

Arduino IDE (ntawm lub khoos phis tawj)

Yeem yeem

Cov qhob cij

Kauj Ruam 1: Tsav Tsheb & Kev Txhim Kho Tsev Qiv Ntawv hauv Arduino IDE

Driver & Library Installation hauv Arduino IDE
Driver & Library Installation hauv Arduino IDE
Driver & Library Installation hauv Arduino IDE
Driver & Library Installation hauv Arduino IDE
  1. Ua ntej, mus rau Cov Cuab Yeej >> Pawg Thawj Coj thiab hloov nws mus rau pawg twg uas koj muaj. Tej zaum koj yuav tau ntxiv nws siv Tus Thawj Saib Xyuas Haujlwm.
  2. Tom qab ntawd, hloov chaw nres nkoj mus rau qhov chaw nres nkoj twg koj muaj, thiab teeb tsa qhov upload ceev rau 115200.
  3. Tom ntej no, mus rau Sketch >> suav nrog Lub Tsev Qiv Ntawv >> Tswj Tsev Qiv Ntawv thiab ntxiv cov tsev qiv ntawv hauv qab no

    1. Arduino_Json
    2. NTPClient
    3. Adafruit GFX Lub Tsev Qiv Ntawv
    4. Adafruit SSD1306
    5. Sijhawm

Tom qab ntawd, koj tau npaj txuas lub Circuit Court.

Kauj Ruam 2: Kev Sib Txuas Circuit thiab Kev Xeem

Kev Sib Txuas Circuit thiab Kev Xeem
Kev Sib Txuas Circuit thiab Kev Xeem
Kev Sib Txuas Circuit thiab Kev Xeem
Kev Sib Txuas Circuit thiab Kev Xeem
Kev Sib Txuas Circuit thiab Kev Xeem
Kev Sib Txuas Circuit thiab Kev Xeem

Pib los ntawm kev txuas VCC tus pin rau 3.3V tso tawm ntawm ESP32 thiab txuas GND rau hauv av.

Tom ntej, txuas SCL tus pin rau D22 tus pin ntawm koj ESP32 thiab txuas SDA tus pin rau D21 tus pin ntawm koj ESP32.

Txhawm rau ntsuas OLED, mus rau FIle >> Piv txwv thiab nqes mus txog thaum koj mus txog Piv txwv los ntawm cov tsev qiv ntawv tshwj xeeb. Tam sim no, tshawb nrhiav Adafruit SSD1306. Xaiv ssd1306_128x64_i2c. Koj yuav tau xaiv lwm qhov yog tias koj li OLED txawv.

Ib qho kev hloov kho uas tseem ceeb rau koj los ua yog tias yog koj lub OLED tsis muaj khawm rov pib dua, tom qab ntawd koj yuav tsum teeb tsa qhov sib txawv rau -1.

#define OLED_RESET -1

Kauj ruam 3: Code

Tam sim no, qhov no yog qhov nyuaj tshaj plaws. cov coding. Kom tau txais cov ntaub ntawv, kuv siv qhov no. Nov yog cov cai kuv tau sau. Tam sim no, yog tias koj tsis xav nkag siab tias nws tau sau li cas, thiab tsuas yog xav sim nws, lub taub hau mus rau qib tom ntej.

Txwv tsis pub, cia pib.

Thaum pib ntawm txoj cai, 'suav nrog' qhia qhov haujlwm uas, tsev qiv ntawv siv, uas pab sau cov haujlwm yooj yim, nrog rau ntxiv cov yam ntxwv zoo li OLED.

Tom qab ntawd, nws mus rau tus neeg rau zaub mov thiab nug txog qhov hloov tshiab kawg, uas nws tom qab ntawd ua qauv thiab nthuav tawm ntawm lub vijtsam.

Kuv kuj tau ntxiv cov lus pom ntawm txhua kauj ruam hauv cov cai kom nkag siab ntau ntxiv.

Kauj Ruam 4: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim

Tam sim no, txhawm rau ua haujlwm, txheeb xyuas tias koj tau xaiv qhov chaw nres nkoj siv tau thiab koj tus tsav tsheb tau teeb tsa. Ua raws qhov txuas no yog tias nws tsis yog, lossis tshawb hauv online.

Tam sim no, mus thiab nias lub pob upload tom qab txuas koj lub rooj tsavxwm, thiab koj yuav tsum tau txais cov txiaj ntsig zoo ib yam li saum toj no.

Nrog koj zoo siab! Tam sim no koj tau txais qhov ua haujlwm tau zoo tiv thaiv COVID. Ua si nrog cov cai thiab saib yog tias koj tuaj yeem txuas nws rau lub suab nrov los qhia koj thaum tus lej tau nce, lossis ua rau nws qhia txog lub tebchaws tshwj xeeb.

Cia siab tias qhov kev kis mob no yuav xaus sai sai, thiab zoo siab pom koj yuav ua dab tsi, Kos Npe Tawm, Xarcrax

Pom zoo: