본문으로 바로가기

아두이노 Uno에 바로 삽입해서 사용할 수 있는 2.8인치 터치스크린 TFT LCD 모듈.

현재 많이 사용하는 Adafruit 라이브러리에서 디바이스를 자동 인식을 못하는 문제가 있어서 셋업하고 테스트 하는데 좀 힘들었다.

현재 많이 사용하는 Adafruit 라이브러리는 SPI type이지만, 본 제품은 Parallel type이다.

LCD Panel 구석에 제품명이 "QR4 5265S01 G4/8 TP28017"로 되어있다.


첨부 라이브러리 설치할 것.

TFTLCD-Library-master.zip

Adafruit_TouchScreen-master.zip

Adafruit-GFX-Library-master.zip


< 사용방법 >

1. Adafruit_TFTLCD.h 파일에 //#define USE_ADAFRUIT_SHIELD_PINOUT 1 이렇게 되어있는지 확인

2. 예제에서 "uint16_t identifier = tft.readID()" 라고 되어있는 걸 "uint16_t identifier = 0x9341" 로 바꾼다.

   또는 tft.begin(0x9341) 로 수정해도 된다.


데이터 시트

UNO-R3-28-TFT-Touch-Screen-With-SD-Card-Socket.pdf


참조링크

https://www.amazon.co.uk/review/R2SXTEC9OVFBVY

http://blog.ylett.com/2017/01/playing-with-jaycar-28-tft-lcd-touch.html

http://i401gou.blog.fc2.com/blog-entry-222.html



터치스크린의 좌표도 반대임.

// scale from 0->1023 to tft.width
p.x = map(p.x, TS_MINX, TS_MAXX,0,tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY,0,tft.height());
Also uncomment the serial.print commands so you can calibrate your particular touchscreen (change TS_MINX, TS_MINY, TS_MAXX, TS_MAXY & change to suit)

Lastly, the SDcard reader is on the SPI bus but the SD-CS (marked SD-SS) pin is on 10. Using the included example in the Arduino IDE, load SD, Listfiles.
Change "if (!SD.begin(4)) {" to " if (!SD.begin(10)) {"
The tftbmp.pde file in the Adafruit TFTLCD library works correctly