Cov txheej txheem:

LCD 16x2 Interface Nrog Raspberry Pi: 7 Kauj Ruam
LCD 16x2 Interface Nrog Raspberry Pi: 7 Kauj Ruam

Video: LCD 16x2 Interface Nrog Raspberry Pi: 7 Kauj Ruam

Video: LCD 16x2 Interface Nrog Raspberry Pi: 7 Kauj Ruam
Video: Interface LCD Display 16×2 with Stm32 2024, Hlis ntuj nqeg
Anonim
LCD 16x2 Interface Nrog Raspberry Pi
LCD 16x2 Interface Nrog Raspberry Pi

Nyob zoo cov phooj ywg, Hnub no kuv tab tom cuam tshuam 16x2 Zaub rau Raspberry pi.

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau

Ntawm no koj xav tau cov khoom siv hauv qab no kom ua tiav txoj haujlwm.

  1. Raspberry Pi
  2. fais fab mov adapter rau Raspberry Pi
  3. 16x2 LCD zaub
  4. potentiometer 10k ib
  5. txuas xov hlau
  6. daim ntawv qhia zaub mov lossis ib qho 16x2 zaub thaiv npog

Kauj Ruam 2: Kev Sib Txuas Hauv Circuit

Kev Sib Txuas Circuit
Kev Sib Txuas Circuit

Kev sib txuas tau qhia hauv daim duab no. Tab sis nws tsis tas yuav siv GPIO's no. Koj tuaj yeem siv ib qho GPIO txuas rau LCD. Tab sis koj yuav tsum hais tib yam GPIO's hauv Programming.variable resistor txuas nrog los kho qhov sib txawv ntawm cov zaub. Cov zaub tau siv los ntawm Raspberry pi. R/W tus pin txuas nrog hauv av vim tias kuv tsis ua haujlwm nyeem ntawv ntawm cov zaub.

Kauj ruam 3: Ua haujlwm

Ua hauj lwm
Ua hauj lwm

Kuv tsim lub tsev qiv ntawv tso saib uas yog lcd.py Hauv lub tsev qiv ntawv no kuv sau qee qhov haujlwm uas tuaj yeem hu los ntawm tus neeg siv. Txhawm rau tsav lcd nws yuav tsum suav nrog lub tsev qiv ntawv no hauv koj cov cai. Xav paub ntau ntxiv txog lub tsev qiv ntawv muaj nyob hauv tsev qiv ntawv.

Ua ntej tshaj plaws koj yuav tsum ua kom pib () muaj nuj nqi thiab hla tus pin uas koj yuav siv rau kev tso saib.

Ntawm no Luam () ua haujlwm tuaj yeem luam tawm tus nqi dhau los rau txoj haujlwm no.

Cov zaub no tau hloov pauv hauv 4 hom me ntsis yog li tsuas yog 4 pins D4-D7 thiab RW, EN pins txuas nrog tus pin raspberry.

Kauj Ruam 4: Xeem

Image
Image

Nov yog cov vis dis aus sim muaj

Kauj ruam 5: Code

Cov cai no muaj rau cov lus qhia ntawm no

Kauj Ruam 6: Qhov tsis zoo

Qhov no yuav tsis ua haujlwm zoo yog tias peb tso cov ntawv no los ua haujlwm ntawm khau raj. Qhov no yog vim tias Raspberry pi tsis yog lub sijhawm tswj hwm tiag. Xav tau qee qhov kev txhim kho ntxiv hauv cov cai no

Kauj Ruam 7: Tiv tauj Peb

Yog xav paub ntau ntxiv ua raws ntawm no

Facebook

blog

email kuv

Pom zoo: