Cov txheej txheem:

Siv TFT 1.44 Nrog Arduino Nano: 4 Cov Kauj Ruam
Siv TFT 1.44 Nrog Arduino Nano: 4 Cov Kauj Ruam

Video: Siv TFT 1.44 Nrog Arduino Nano: 4 Cov Kauj Ruam

Video: Siv TFT 1.44 Nrog Arduino Nano: 4 Cov Kauj Ruam
Video: SivHD TRIES TFT & GETS ROUND 2 ZOE 2024, Hlis ntuj nqeg
Anonim
Siv TFT 1.44 Nrog Arduino Nano
Siv TFT 1.44 Nrog Arduino Nano

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas txuas lub TFT 1.44 LCD npo uas los ntawm Robo-Geek Kits.

Cov ntxaij vab tshaus LCD me me no tau yooj yim thaum ua haujlwm nrog micro-robotics vim nws muab cov zaub yooj yim ntawm 128 x 128 pixels. Muaj 2 hom TFT 1.44, ib qho suav nrog SD daim npav thiab ib qho uas tsis muaj tus nqi $ 15 US thiab $ 5 US feem. Cov ntawv qhia no yuav npog TFT 1.44 uas tsis muaj daim npav SD.

Cov ntawv qhia no tau sim nrog Arduino Uno lossis Arduino Nano. Yog tias koj muaj lwm lub Rooj Tswjhwm Saib Arduino, thov tshuaj xyuas cov ntaub ntawv vim tus txheej txheem tus pin yuav txawv. Thaum kawg peb xav tias tus neeg siv muaj theem pib nkag siab yuav siv Arduino li cas thiab ua hluav taws xob sib txuas. Yog tias koj yog tus tshiab rau Arduino ntiaj teb, peb xav qhia kom txheeb xyuas cov lus qhia no:

www.instructables.com/id/Arduino-Nano/

Kauj ruam 1: Rub tawm Cov Tsev Qiv Ntawv Yuav Tsum Tau

Rub tawm Cov Tsev Qiv Ntawv Yuav Tsum Tau
Rub tawm Cov Tsev Qiv Ntawv Yuav Tsum Tau

Ntxiv cov tsev qiv ntawv hauv qab no rau Arduino:

github.com/adafruit/Adafruit-GFX-Library

github.com/adafruit/Adafruit-ST7735-Librar…

Yog tias koj tsis paub yuav ntxiv cov tsev qiv ntawv li cas, xa mus rau qhov no:

www.arduino.cc/en/Guide/Libraries

Kauj Ruam 2: Txuas TFT 1.44 rau Arduino

Txuas TFT 1.44 rau Arduino
Txuas TFT 1.44 rau Arduino
Txuas TFT 1.44 rau Arduino
Txuas TFT 1.44 rau Arduino
Txuas TFT 1.44 rau Arduino
Txuas TFT 1.44 rau Arduino

Nyob sab nraum qab ntawm TFT 1.44 LCD npo, peb tuaj yeem pom kev sib txuas los ntawm LED mus rau VCC. Peb hais kom sau nws rau hauv ib daim ntawv raws li qhia hauv daim duab nrog cov lus xiav.

TFT haum zoo thaum siv lub khob cij. Xyuas kom tseeb tias txhua tus pin nyob hauv tib kab thiab txhawm rau txhim kho nws maj mam li cov pins yog qhov muag. Txheeb daim duab kom pom tias qhov kev txuas zoo li cas.

Peb tau sim tshuaj ntsuam ob peb zaug thiab peb ntseeg tias qib hloov pauv yog xaiv tau, yog li peb yuav txuas ncaj qha los ntawm Arduino mus rau TFT 1.44 LCD npo.

Nrog kev hwm rau Arduino pins

LED rau 3.3 VSCK rau D13

SDA to CSY

A0 rau D8

TXC to D9

CSY to D10

GND to CSY

VCC rau 5.0 V.

Kauj Ruam 3: Txoj Cai: Suav Suav

Kev tshoov siab ntawm Short Circuit movie, cov cai no tsim tawm lub txee los qhia qhov peev xwm ntawm TFT 1.44 LCD npo. Txhawm rau pom qhov txiaj ntsig kawg, txheeb xyuas cov vis dis aus.

Kauj ruam 4: Troubleshooting

Teeb meem
Teeb meem

Yog tias koj muaj teeb meem khiav cov cai, peb hais kom ua cov hauv qab no:

1. Xyuas kom kev sib txuas tau ua tiav kom raug nrog lub voltmeter

2. Yog tias cov zaub raug teeb tsa nyob rau hauv txoj kab ntsug, ntxiv qhov sib txawv rau cov cai:

int yoffset = 32;

Tom qab ntawd ntxiv yoffset rau kos cov lus txib, piv txwv li:

tft.drawLine (10, 32 + yoffset, 10, 52 + yoffset, RED);

3. Yuav ua li cas yog tias Adafruit cov tsev qiv ntawv tsis pom nrog cov xim xav tau. Qhov no nyuaj me ntsis los daws. Peb cov lus pom zoo, tsim kom muaj nuj nqi me me uas tso saib txhua xim thiab cim tus lej. Cov khoom siv hluav taws xob pheej yig yuav tsum tau nyiag me ntsis ntxiv, qhov no yog txhua yam, nws yog ib feem ntawm kev lom zem. Txheeb xyuas cov xim hauv qab no ua ntej, thiab kho kom haum.

#define BLACK 0x0000

#define RED 0x001F

#define BLUE 0xF800

#define GREEN 0x07E0

#define YELLOW 0x07FF

#define PURPLE 0xF81F

#define CYAN 0xFFE0

#define WHITE 0xFFFF

Pom zoo: