Cov txheej txheem:

ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm: 4 Kauj Ruam
ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm: 4 Kauj Ruam

Video: ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm: 4 Kauj Ruam

Video: ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm: 4 Kauj Ruam
Video: ESP32/ESP8266 Отображение показаний датчиков в виде графиков в реальном времени — веб-сервер 2024, Lub Xya hli ntuj
Anonim
ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm
ESP8266 Huab Cua Chaw Nres Nkoj Sijhawm

Txoj haujlwm no yog txoj hauv kev zoo los nthuav qhia lub sijhawm thiab huab cua hauv pob yooj yim me me. Kuv yuav piav qhia txoj haujlwm, nws ua haujlwm li cas thiab qhia cov cai ntawm no.

Koj tuaj yeem nias khawm sib txawv los qhia huab cua tam sim no hauv qhov chaw teeb tsa nrog rau qhov kub thiab txias. Lub hauv paus pom yog lub sijhawm uas rub los ntawm NTP server.

Tsis tas yuav tsum tau teem sijhawm raws li lub sijhawm sib txuas los ntawm NTP server thiab yog qhov tseeb. Hauv qhov teeb tsa no kuv muaj sijhawm thiab IP chaw nyob. Koj tuaj yeem hloov txoj cai kom suav nrog hnub tim, huab cua, siab thiab ntsuas kub kom pom ntawm lub vijtsam loj lossis ntawm cov nyees khawm.

Kauj ruam 1: Schematic

Lub Schematic
Lub Schematic
Lub Schematic
Lub Schematic

Schematic yog qhov ncaj thiab yooj yim rau

ua raws. Muaj cov ntaub ntawv gerber yog tias koj xav tig koj tus kheej PCB. Tag nrho cov Circuit Court yog tsav los ntawm 5V los ntawm micro USB txuas. Qhov no ua rau lub Circuit Court yooj yim thiab yooj yim rau lub zog. 5V tau pub rau hauv Kev Tso Tawm Tsawg 3.3V Tus tswj hwm LM 3940 uas muab 3.3V rau ESP8266. Muaj USB txuas ntawm ESP8266 txawm li cas los xij, kuv xaiv tsis siv nws feem ntau vim tias 5V tab tom tsav lub LCD ib yam nkaus.

3.3V yuav tsum tau siv nrog ESP8266, koj tsis tuaj yeem tsav nws ncaj qha nrog 5V vim nws yuav tua pawg thawj coj.

Ob txoj kev hloov pauv tau cuam tshuam nrog D5 thiab D6 thiab tau teeb tsa hauv cov cai kom coj cov ntaub ntawv sib txawv ntawm lub vijtsam. Kuv muaj cov teeb no Kub/Siab thiab Huab Cua.

Tag nrho cov khoom siv tau yooj yim txhais tes soldered mus rau perfboard lossis gerber muaj nyob hauv kuv GitHub ntawm

Kauj ruam 2: Txoj Cai

github.com/allenelectronics/esp8266weatherstation

Cov cai tau suav ua ke hauv Arduino IDE thiab xav tau qee qhov kev teeb tsa los ua haujlwm

Ua ntej tshaj, koj yuav tsum teeb tsa ESP8266 Pawg Thawj Coj rau IDE txhawm rau txhawm rau rub cov lej rau nws.

Cov lus qhia ntxaws txog yuav ua li cas nyob ntawm no:

Txhawm rau kom ua haujlwm huab cua, Kuv tau xaiv siv RemoteMe uas sau cov ntaub ntawv huab cua ncaj qha los ntawm API thiab tsim cov cai uas tuaj yeem tso rau hauv koj cov cai. Koj yuav tsum tau sau npe thiab teeb tsa cov ntaub ntawv kwj ntawm lawv lub vev xaib:

Cov ntaub ntawv hais txog RemoteMe tuaj yeem pom ntawm no:

Muaj qee qhov kev txhais tshwj xeeb uas yog qhov tshwj xeeb rau koj teeb tsa uas koj yuav tsum tau ua kom tiav ua ntej rub tawm:

#define WIFI_NAME "SSID SAWV DAWS"

#Txhais WIFI_PASSWORD "PASSWORD mus rau ntawm no"

#txhais DEVICE_ID 1

#define DEVICE_NAME "Nkag mus los ntawm REMOTEME. ORG"

#define TOKEN "Nkag mus los ntawm REMOTEME. ORG"

Cov lus txhais ntawm no yuav tsum tau teeb tsa los ntawm koj raws li koj cov ntsiab lus wifi thiab cov cim koj tau txais los ntawm RemoteMe.

Koj yuav tsum paub tseeb tias txhua lub tsev qiv ntawv no tau teeb tsa thiab suav nrog hauv cov cai. Kuv tau suav nrog cov txuas rau cov uas nyuaj dua kom tau txais.

#suav nrog //https://github.com/remoteme/RemoteMeArduinoLibrary

#suav nrog

#suav nrog

#suav nrog

#suav nrog

Qhov kawg uas xav tau hloov pauv yog koj qhov chaw nyob vim qhov haujlwm no tsis siv GPS. Koj yuav tsum hloov kho "LOCATION" txoj hlua:

lwm tus yog (buttonState2 == LOW && prevButtonState2 == HIGH) {

Serial.print ("LOCATION / n");

Serial.println (fc);

lcd.clear ();

lcd.print ("LOCATION");

lcd.setCursor (0, 1);

lcd.print (fc);

lcd.setCursor (0, 0);

ncua (5000);

prevButtonState2 = buttonState2;

Kauj ruam 3: Tsim

Tsim
Tsim
Tsim
Tsim

Tsim

Thaum lub sijhawm kuv tsis muaj kev nkag mus rau lub tshuab luam ntawv 3d, qhov no yog kuv qhov haujlwm kawg uas siv cov ntaub ntawv tawm ntawm lub txee. Kuv siv cov ntawv ceeb toom uas npaj tau yooj yim uas yog tsim los rau 16x2 LCD.

Txuas: https://www.ebay.co.uk/itm/86-Plastic-project-box-enclosure-case-for-diy-LCD1602-meter-tester-with-buttGA/363214674235?hash=item549148193b:g: IvQAAOSwNXpcFFrv

Txhua yam yog khoom nyob rau hauv rooj plaub, 16x2 LCD zaub tau glued rau ntawm lub vaj huam sib luag pem hauv ntej nrog lub rooj tsav xwm hluav taws xob kub-glued hauv qhov chaw.

Kauj Ruam 4: Xaus

Xaus

Nov yog qhov haujlwm zoo rau lub desktop digital moos uas tsis xav tau kev hloov kho lossis teeb tsa, nws siv sijhawm los ntawm NTP server thiab qhia nws ntawm lub teeb pom kev zoo rov qab.

Qhov no tsis yog rau kev pib ua tiav raws li muaj qee qhov teeb tsa rau cov cai xav tau thiab cov ntaub ntawv ntws yuav tsum tau teeb tsa ib yam nkaus. Yog tias koj muaj lus nug lossis lus pom, thov koj tso kuv tawm lus.

Pom zoo: