Cov txheej txheem:

Kev Saib Xyuas Lub Zog hauv 15 feeb: 3 Kauj Ruam
Kev Saib Xyuas Lub Zog hauv 15 feeb: 3 Kauj Ruam

Video: Kev Saib Xyuas Lub Zog hauv 15 feeb: 3 Kauj Ruam

Video: Kev Saib Xyuas Lub Zog hauv 15 feeb: 3 Kauj Ruam
Video: Lub Zog Nruab Nrog (Hmong Dubbed) 2024, Kaum ib hlis
Anonim
Lub Zog Saib Xyuas hauv 15 feeb
Lub Zog Saib Xyuas hauv 15 feeb

Nov yog lub ntsuas hluav taws xob wifi txhawm rau kaw kab xev ntawm koj lub ntsuas hluav taws xob. Nws kuaj pom qhov muag nrog LDR, thiab nthuav tawm lub zog ntawm OLED zaub. Sau npe rau tus account demo dawb:

Qhov xav tau: ESP8266 TTGO 0.91 OLED (lossis tsis tu ncua ESP8266 thiab khiav yam tsis muaj zaub) LDR (lub teeb nyob ntawm tus tiv thaiv) 10K resistor

Nqi: Kwv yees li $ 9 tag nrho.

Ntsis: ESP8266 TTGO 0.91 OLED muag ntawm ebay, tshawb: 'esp8266 oled 0.91'.

Kauj ruam 1: Solder

Solder
Solder
Solder
Solder

Tsuas muaj 4 lub ntsiab lus sib txuas: LDR mus los ntawm A0 txog D0 (gpio16).10K resistor mus los ntawm A0 mus rau GND.

Kauj ruam 2: Code

Qhov program tau ua nrog Arduino. Download code ntawm kuv Github site:

Kev vam khom: Koj xav tau qee lub tsev qiv ntawv, U8g2lib, PubSubClient, Koj pom cov no hauv tus thawj tswj tsev qiv ntawv.

Chaw: Teeb koj qhov tseem ceeb nyob rau sab saum toj ntawm cov cai. Lawv tau piav qhia zoo

Upload: Xaiv tus programmer 'LOLIN (WEMOS) D1 R2 & mini'Yog koj tsis pom nws hauv cov ntawv qhia zaub mov, teeb tsa ESP8266 hauv Arduino Boards Manager.

Mus rau cov xov no yog tias koj TTGO OLED tsis ua haujlwm. Ob peb i2c OLED pinouts tau pom nyob ntawd.

Kauj ruam 3: Thingsboard

Cov khoom ntoo
Cov khoom ntoo
Cov khoom ntoo
Cov khoom ntoo
Cov khoom ntoo
Cov khoom ntoo

Sau npe kom muaj kev ywj pheej nyob dawb ntawm

Ntxiv cov cuab yeej, nrog lub npe Lub Zog Saib Xyuas.

Hauv Ntaus Ntawv 'Paub meej', nyem 'Luam theej duab token'Paste cov hlua no rau THINGSBOARD_TOKEN hauv tus lej, thiab rub tawm.

Yog tias txhua yam mus tau zoo, tam sim no koj yuav tsum pom cov ntaub ntawv hauv Ntaus Ntawv 'Tseeb telemetry'Select' wh 'cov ntaub ntawv xov tooj cua (Xeem Watts ib teev), thiab nyem' Qhia rau widget'Select 'Chart' hauv qhov nco, thiab nrhiav 'Timeseries - Flot 'in the carousel gallery. Click' Add to Dashboard'. Select a existing, or create a new dashboard. Select 'Open Dashboard', and click OK. In Dashboard you want to change Timewindow to 2 hour, and Data aggregation to Tsis muaj

Rau Analog gauge, ua tib cov kauj ruam los ntawm Telemetry, thiab xaiv Analog gauge hauv Widget. Thaum koj rov qab los rau Dashboard, Cov ntsuas ntsuas ntsuas tau kho., Yam tsawg kawg thiab Qhov siab tshaj tau teev tseg rau 0 thiab 8000, thiab 'Cov zuam loj suav' tau teev rau 10, los ntxuav 1000 tus cim.

Ua tiav

Pom zoo: