Cov txheej txheem:

Kev cuam tshuam LCD 20X4 Zaub rau Nodemcu: 3 Cov Kauj Ruam
Kev cuam tshuam LCD 20X4 Zaub rau Nodemcu: 3 Cov Kauj Ruam

Video: Kev cuam tshuam LCD 20X4 Zaub rau Nodemcu: 3 Cov Kauj Ruam

Video: Kev cuam tshuam LCD 20X4 Zaub rau Nodemcu: 3 Cov Kauj Ruam
Video: Распаковка WF-7710 WF-7720 - Как снять чехол и сканер с Epson WorkForce 2024, Kaum ib hlis
Anonim
Interfacing LCD 20X4 Zaub rau Nodemcu
Interfacing LCD 20X4 Zaub rau Nodemcu

Kuv txiav txim siab los qhia qhov no raws li kuv tau ntsib teeb meem nrog kuv txoj haujlwm dhau los ua ntej, Kuv tau sim ua duab nraaj (128x64) LCD nrog Nodemcu tab sis tsis muaj txiaj ntsig, kuv ua tsis tau. Kuv xam tawm tias qhov no yuav tsum yog qee yam ua nrog lub tsev qiv ntawv (Lub tsev qiv ntawv rau duab LCD sib txawv ntawm LCD), Zoo li lub tsev qiv ntawv tam sim no tsis haum rau GLCD cuam tshuam nrog nodemcu, tiag tiag vam tias lawv tawm nrog "tsev qiv ntawv tsim nyog" tsis ntev Kuv xav sim tab sis kuv nyob hauv lub sijhawm txwv kuv thiaj txiav txim siab hloov pauv los ntawm cov duab nraaj LCD mus rau Bluebacklight 20x4 LCD. Kuv xav tias qhov no yuav yooj yim raws li cov yam ntxwv zoo ib yam li 16x2 LCD tab sis kuv tau ua yuam kev dua. Yog li, pib ntawm kuv txoj kev sim-n-yuam kev los ua qhov haujlwm no.

Kev cuam tshuam ib qho LCD nrog Arduino Uno yog qhov yooj yim, koj tuaj yeem pom ntau yam kev qhia muaj. Kuj tseem muaj kev qhia rau Interfacing LCD nrog NodeMCU muaj, qee qhov siv "I2C expender" ntawm "Shift register" thiab qee qhov lwm tus siv "I2C LCD adapter" tab sis zoo li tsis yog txhua qhov kev qhia no tau txais thiab qee qhov 'dhau lawm', lawv yuav yog siv cov tsev qiv ntawv sib txawv lossis qub, Kuv tau txais qhov yuam kev ib zaug zoo li no: "Ua yuam kev sau ua ke rau board NodeMCU 1.0 (ESP-12E Module)", yog li kuv hloov mus rau lub tsev qiv ntawv sib txawv. Ua tiav suav tab sis nrog ceeb toom: "CEEB TOOM: tsev qiv ntawv LiquidCrystal_I2C-1.1.2 thov kom khiav ntawm (avr) architecture (s) thiab tej zaum yuav tsis sib xws nrog koj lub rooj tsav xwm tam sim no uas ua haujlwm ntawm (esp8266) architecture (s)", Kuv tau muab rau nws sim ib qho twg, upload rau kuv lub rooj tsavxwm tom qab ntawd Ua tiav!

Kauj Ruam 1: Upload Cov Tsev Qiv Ntawv rau hauv Arduino Libraries

Rub cov tsev qiv ntawv mus rau Arduino Libraries
Rub cov tsev qiv ntawv mus rau Arduino Libraries

Ua ntej pib, ua kom koj tau teeb tsa lub tsev qiv ntawv rau NodeMCU, yog tias tsis yog koj tuaj yeem ua raws cov theem no ntawm no. Tom qab ntawd tsis txhob hnov qab rub tawm thiab teeb tsa koj lub tsev qiv ntawv LiquidCrystal_I2C rau koj lub LCD ib yam.

Txuas ntawm no yog cov ntawv zip ntawm LiquidCrystal_I2C lub tsev qiv ntawv uas kuv tau siv rau qhov kev qhia no. Kuv tsis nco qab lub vev xaib twg kuv rub tawm los ntawm tab sis credit rau tus tswv.

sau ntawv: qhov no yog cov ntawv uas tuaj nrog ceeb toom kuv tau hais ua ntej. Tab sis kuv tsis muaj teeb meem xa cov chaws rau kuv NodeMCU pawg thawj coj.

Kauj ruam 2: Txuas Koj Tus Pin

Txuas Koj Tus Pin
Txuas Koj Tus Pin

Kuv tab tom txuas LCD zaub rau NodeMCU los ntawm kev siv I2C LCD cov lej txuas, los ntawm 8 tus lej ntawm LCD mus rau 4 tus pin ntawm lub adapter. Qhov no yooj yim heev li NodeMCU me me thiab peb xav txwv kev siv tus pin ntawm lub rooj tsavxwm ntawd. Kuv siv tus pin D1, D2, Vin thiab Gnd ntawm NodeMCU. Kev sib txuas rau LCD:

Vin = VCC

Nwg = Gnd

D1 = SDA

D2 = SCL

Ncaj nraim

Kauj ruam 3: Upload Code thiab Khiav

Upload Code thiab Khiav
Upload Code thiab Khiav
Upload Code thiab Khiav
Upload Code thiab Khiav

Luam cov cai kuv txuas ntawm no, thiab khiav. Nco ntsoov tias koj tau xaiv Alter code rau koj nyiam. Hmoov zoo.

Thov kom phau ntawv qhia me me no pab tau koj. Yog tias muaj lus nug, tsis txhob ua siab deb los tawm tswv yim.

Pom zoo: