Cov txheej txheem:

Arduino thiab Cim LCD Hookup hauv BreadShield: 6 Kauj Ruam
Arduino thiab Cim LCD Hookup hauv BreadShield: 6 Kauj Ruam

Video: Arduino thiab Cim LCD Hookup hauv BreadShield: 6 Kauj Ruam

Video: Arduino thiab Cim LCD Hookup hauv BreadShield: 6 Kauj Ruam
Video: How to Use I2C LCD with Arduino | Very Easy Arduino LCD I2C Tutorial | Arduino 16x2 LCD I2C Tutorial 2024, Kaum ib hlis
Anonim
Arduino thiab Cim LCD Hookup hauv BreadShield
Arduino thiab Cim LCD Hookup hauv BreadShield

Ntau lub phiaj xwm Arduino koom nrog cov cim LCDs, uas siv ntau dhau HD44780 raws tu qauv kom tau txais cov ntaub ntawv los ntawm Arduino. Txuas Arduino rau HD44780 feem ntau (hauv 4-ntsis hom) siv 12 xov hlau! Qhov ntawd yuav xaus rau qhov tsis meej pem loj ntawm jumper hlau spaghetti. Nws yuav siv sijhawm koj los txuas lawv. Nws nyuaj rau debug. Thiab nws nquag cuam tshuam los ntawm koj cov ntiv tes tsis meej pem.

Hauv qhov kev qhia no, peb yuav pom tias lub neej tuaj yeem yooj yim dua hauv BreadShield, Arduino daim ntaub thaiv rau lub khob cij.

Khoom siv

  • Ib daim ntawv qhia zaub mov
  • Ib Arduino Uno
  • Ib qho BreadShield

Kauj Ruam 1: Ntxig BreadShield rau hauv Arduino Uno

Ntxig BreadShield rau hauv Arduino Uno ib yam li koj ib txwm ua los siv lwm daim thaiv npog.

Kauj Ruam 2: Ntxig BreadShield rau hauv Breadboard

Ntxig cov kab tawg ntawm BreadShield rau hauv lub khob cij, ib yam li koj ib txwm ntxig kab ntawm cov pins rau hauv lub khob cij.

Kauj Ruam 3: Ntxig lub LCD rau hauv Breadboard

Ntxig lub LCD rau hauv Breadboard
Ntxig lub LCD rau hauv Breadboard

Kuv xav tias koj lub LCD tau muag nrog txiv neej tus pinheaders, xws li hauv qhov kev qhia no los ntawm SparkFun. Tam sim no ntxig lub LCD (thev naus laus zis tus txiv neej tus pin) rau hauv lub khob cij, nrog GND tus pin ntawm LCD sib piv GND tus pin ntawm BreadShield. Qhov no yuav cia li tsim cov lus sib txuas tus pin-to-pin hauv qab no ntawm Arduino Uno thiab LCD (ntawm sab laug, tus pin LCD; ntawm sab xis, BreadShield tus pin):

VSS/GND ---- GNDVDD ---- 5VRS ---- TX E/pab kom ---- D3 D4 ---- D8D5 ---- D9D6 ---- D10D7 ---- D11 backlight anode- --- D12 backlight kathode ---- D13

Txoj kev khiav mus los yog pom hauv daim duab saum toj no.

Kauj Ruam 4: Rub LCD tus R/W Pin rau GND

Siv ib lub xaim jumper - tsuas yog lub xaim jumper xav tau hauv txoj haujlwm no, txhawm rau rub LCD tus R/W tus pin rau GND. Yog, qhov no kuj txhais tau tias txuas D2 ntawm Arudino rau GND. Tab sis qhov ntawd tsis yog teeb meem tsuav koj tsis siv D2.

Kauj Ruam 5: Ntxig rau Potentiometer

Ntxig rau Potentiometer
Ntxig rau Potentiometer

Ntxig lub potentiometer ua qhov faib hluav taws xob. Ntxig lub davhlau ya nyob twg xaus ntawm lub hwj chim ntsuas rau hauv 5V thiab GND sib txuas ua ke ntawm lub khob cij. Thiab tus naj npawb nruab nrab ntawm tus pin rau hauv kev sib txuas ntawm RX. Cov kab hluav taws xob tshwm sim tau qhia hauv daim duab saum toj no. Kuv xav tias tus potentiometer muaj qee lub xov hlau txuas rau nws ob txhais ceg lossis koj siv cov xov hlau txuas mus rau txoj kab 3 pins ntawm nws los ntawm lwm qhov chaw ntawm lub khob cij.

Kauj Ruam 6: Ua Haujlwm Koj Arduino, Nrog Potentiometer Nruab Nrab Tus Pin Txuas

Program Koj Arduino, Nrog rau Potentiometer Nruab Nrab Tus Pin Txuas
Program Koj Arduino, Nrog rau Potentiometer Nruab Nrab Tus Pin Txuas

Tam sim no koj tuaj yeem program koj Arduino. Ib qho piv txwv code yog nyob ntawm

github.com/forrestbao/BreadShield/blob/master/demo/HelloWorld/HelloWorld.ino

Txhawm rau ua haujlwm, nco ntsoov tias RX tus pin raug txuas los ntawm tus pin nruab nrab ntawm lub hwj chim. Tsuas yog maj mam nqa tus pin nruab nrab ntawm lub hwj chim tawm ntawm txoj hlua khi ntawm lub khob cij. Tom qab lub program, ntxig nws rov qab. Tom qab ntawd koj yuav pom cov ntawv cov ntsiab lus pom ntawm LCD. Yog tsis yog, kho lub hwj chim.

Xav tias tawm lus lossis lus nug ntawm no thiab kuv yuav teb sai li sai tau.

Txaus siab rau ntau qhov piv txwv ntawm BreadShield hauv qhov vis dis aus no.

Tam sim no BreadShield tab tom ua haujlwm sib sau ua ke. Ua kom zoo dua ntawm cov phiaj xwm luv nqi-tsuas yog tus nqi ntawm

Pom zoo: