Cov txheej txheem:

Paub meej thiab Kev Sib Txuas ntawm I2C LCD Adapter: 5 Kauj Ruam
Paub meej thiab Kev Sib Txuas ntawm I2C LCD Adapter: 5 Kauj Ruam

Video: Paub meej thiab Kev Sib Txuas ntawm I2C LCD Adapter: 5 Kauj Ruam

Video: Paub meej thiab Kev Sib Txuas ntawm I2C LCD Adapter: 5 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Cov ntsiab lus thiab kev sib txuas ntawm I2C LCD Adapter
Cov ntsiab lus thiab kev sib txuas ntawm I2C LCD Adapter

I2C lcd adapter yog ib lub cuab yeej uas muaj micro-controller PCF8574 nti. Tus tswj hwm micro no yog I/O nthuav dav, uas sib txuas lus nrog lwm lub micro-maub los nti nrog ob txoj kev sib txuas xov hlau. Siv qhov hloov pauv no leej twg tuaj yeem tswj tau 16x2 LCD nrog tsuas yog ob lub xov hlau (SDA, SCL). Nws txuag ntau tus pin ntawm arduino lossis lwm tus tswj hwm micro. Nws muaj lub zog tsim hluav taws xob los tswj kev sib piv lcd. Qhov default I2C chaw nyob yog 0x27. Koj tuaj yeem hloov qhov chaw nyob no los ntawm kev txuas A0, A1, A2.

A0 A1 A2 Chaw Nyob

0 0 0 0x20 0 0 1 0x21 0 1 0 0x22 0 1 1 0x23 1 0 0 0x24 1 0 1 0x25 1 1 0 0x26 1 1 1 0x27

0 => LAWD

1 => HLO

Kauj Ruam 1: Kev Sib Txuas Ntawm LCD thiab Adapter

Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter
Kev Sib Txuas Ntawm LCD thiab Adapter

Ua ntej tshaj, koj yuav tsum tau muab lub tshuab tso rau ntawm lub lcd. Koj tuaj yeem txuas nws ncaj qha rau lub lcd zaub tom qab. Tab sis kuv tau muab nws tso rau ntawm pcb. Koj tseem tuaj yeem ua nws raws li koj xav tau. Tab sis koj yuav tsum tau ceev faj txog qhov txuas zoo. Txwv tsis pub koj yuav ntsib teeb meem loj.

Kauj Ruam 2: Kev Txuas Nrog Arduino thiab I2C Lcd Adapter

Kev Txuas Nrog Arduino thiab I2C Lcd Adapter
Kev Txuas Nrog Arduino thiab I2C Lcd Adapter

Arduino => I2C LCD adapter

GND => GND

5V => VCC

A4 => SDA

A5 => SCL

Kauj Ruam 3: Fais Fab Thiab Kuaj

Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj
Hwj chim thiab Kuaj

#define USE_ALB_LCD_I2C

#suav nrog "ArduinoLearningBoard.h" ALB_LCD_I2C lcd; teeb tsa tsis muaj dabtsis () {lcd.init (); lcd.backlight (); lcd.clear (); } void loop () {lcd.setCursor (0, 0); // lcd.setCursor (coloumn, kab); lcd.print ("ABCD 1234 +-/*"); lcd.setCursor (0, 1); // ntawm no kab = 1 txhais tau tias kab thib ob lcd.print ((char) 64); // 64 = @ lcd.print ((char) 223); // 223 = dgree kos npe lcd.print ((char) 224); // 224 = alpha kos npe lcd.print ((char) 232); // 232 = root lcd.print ((char) 242); // 242 = thita lcd.print ((cov) 228); // 228 = micro}

Kauj Ruam 4: Rub Lub Tsev Qiv Ntawv rau I2C Lcd

Rub tawm Lub Tsev Qiv rau I2C Lcd
Rub tawm Lub Tsev Qiv rau I2C Lcd
Rub tawm Lub Tsev Qiv rau I2C Lcd
Rub tawm Lub Tsev Qiv rau I2C Lcd

qhib arduino IDE => mus rau Cov Cuab Yeej => tswj cov tsev qiv ntawv => tshawb rau Arduino Learning Board

thiab rub lub tsev qiv ntawv.

Yog tias koj twb muaj lub tsev qiv ntawv lawm ces hla cov kauj ruam no.

Kauj Ruam 5: Kauj Ruam Kawg

Kauj Ruam Kawg
Kauj Ruam Kawg
Kauj Ruam Kawg
Kauj Ruam Kawg

Kuv tau siv I2C lcd los qhia qhov kub thiab txias ntawm ib puag ncig.

Pom zoo: