#1 hướng dẫn lập trình lcd tft 2.0″ bằng arduino uno r3

Đào Hùng 09/04/2021
1-huong-dan-lap-trinh-lcd-tft-2-0-bang-arduino-uno-r3

Mở đầu

  • Xin chào các bạn! chắc hẳn các bạn cũng đã từng nghịch ngợm, vọc vạch các loại LCD như LCD1602, LCD2004,….
  • hôm nay mình xin giới thiệu đến các bạn loại LCD TFT cụ thể là con LCD TFT 2.0 inch sử dụng chip ILI9225.

Chuẩn bị

Phần cứng
Arduino Uno x1
LCD TFT 2.0 inch SPI x1
Dây cắm board test đực cái x7
Phần mềm
Arduino IDE  
Thư viện
TFT_22_ILI9225  

Màn hình LCD TFT 2.0 inch

#1 Hướng dẫn lập trình LCD TFT 2.0″ bằng arduino uno R3

 

Thông số kĩ thuật

IC điều khiển : ILI9225
Chuẩn giao tiếp : SPI
Kích thước : 2.0 inch
Độ phân giải : 176×220 pixel
Điện áp cung cấp : 3.3-5 VDC
Cảm ứng : Không hỗ trợ

 

  • Hỗ trợ gắn trực tiếp lên Arduino MCU mà không cần bất kì kết nối nào.
  • Tích hợp IC ổn áp, hỗ trợ điện áp cấp 3.3V hoặc 5V.
  • Tương thích với mức IO 3.3V/5V, hỗ trợ các kết nối I/O MCU.
  • Tích hợp mạch điều khiển đèn nền, có thể điều khiển bật/tắt hoặc làm mờ dùng PWM.
  • Tích hợp mạch mở rộng thẻ SD.
  • Dễ dàng mở rộng ứng dụng với Preserve SPI FLASH word circuit.

Đấu nối LCD TFT 2.0 inch với Arduino Uno

#1 Hướng dẫn lập trình LCD TFT 2.0″ bằng arduino uno R3

 

LCD TFT SPI 2.0 Inch Arduino Uno R3
VCC 3V
GND GND
RST 8
RS 9
CS 10
SDA 11
CLK 13

Code

Lưu ý: Code dưới đây phù hợp với thư viện phiên bản 1.41

#include "SPI.h"
#include "TFT_22_ILI9225.h"
 
#ifdef ARDUINO_ARCH_STM32F1
#define TFT_RST PA1
#define TFT_RS  PA2
#define TFT_CS  PA0 // SS
#define TFT_SDI PA7 // MOSI
#define TFT_CLK PA5 // SCK
#define TFT_LED 0   // 0 if wired to +5V directly
#else
#define TFT_RST 8
#define TFT_RS  9
#define TFT_CS  10  // SS
#define TFT_SDI 11  // MOSI
#define TFT_CLK 13  // SCK
#define TFT_LED 3   // 0 if wired to +5V directly
#endif
 
#define TFT_BRIGHTNESS 200 // Initial brightness of TFT backlight (optional)
 
// Use hardware SPI (faster - on Uno: 13-SCK, 12-MISO, 11-MOSI)
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED, TFT_BRIGHTNESS);
// Use software SPI (slower)
//TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_SDI, TFT_CLK, TFT_LED, TFT_BRIGHTNESS);
 
// Variables and constants
uint16_t x, y;
boolean flag = false;
 
/*
 * Tux black/white image in 180x220 converted using Ardafruit bitmap converter
 * https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code
 */
static const uint8_t PROGMEM tux[] = 
{
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x1,0xfc,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x7,0xfe,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x1,0xf8,0x0,0xf,0xff,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x3,0xfc,0x0,0x1f,0xff,0x80,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7,0xfe,0x0,0x1f,0xff,0xc0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7,0xfe,0x0,0x3f,0xff,0xc0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf,0xff,0x0,0x3f,0xff,0xe0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf,0xff,0x0,0x7f,0xf,0xe0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf,0xbf,0x80,0x7e,0x7,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf,0xf,0x80,0x7c,0x7,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x7,0x80,0x78,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x7,0x80,0x78,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x7,0x80,0x78,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x3,0x80,0x78,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x3,0x0,0x38,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x0,0x0,0x0,0x3,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x0,0xff,0xc0,0x3,0xe0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x6,0x1,0xff,0xf8,0x3,0xe0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7,0x7,0xff,0xfc,0x7,0xe0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3,0x8f,0xff,0xff,0x7,0xc0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3,0x1f,0xff,0xff,0xc0,0x80,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x3f,0xff,0xff,0xf8,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0xff,0xff,0xff,0xff,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1,0xff,0xff,0xff,0xff,0xc0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3,0xff,0xff,0xff,0xff,0xe0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf,0xff,0xff,0xff,0xff,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xf,0xff,0xff,0xff,0xfe,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x19,0xff,0xff,0xff,0xf8,0x70,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x18,0xff,0xff,0xff,0xe0,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x1c,0x7f,0xff,0xff,0x87,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xe,0x3f,0xff,0xff,0xf,0xe0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7,0x1f,0xff,0xfc,0x3f,0xc0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7,0x87,0xff,0xf0,0xff,0x80,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x3,0xe1,0xff,0xc3,0xff,0x10,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0xf0,0x38,0xf,0xfe,0x38,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x7e,0x0,0x3f,0xf8,0x78,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x2,0x1f,0xe7,0xff,0xc1,0xf8,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x3,0x8f,0xff,0xff,0x7,0xfc,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x3,0xc7,0xff,0xfe,0x3f,0xfc,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x3,0xe3,0xff,0xf8,0x7f,0xfc,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x7,0xf0,0xff,0xe1,0xff,0xfe,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x7,0xfc,0x3f,0x7,0xff,0xfe,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7,0xfe,0x0,0x1f,0xff,0xfe,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7,0xff,0xc0,0xff,0xff,0xff,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x7,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0xf,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0xf,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x2,0x0,0x0,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x1,0x0,0x0,0x7f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x80,0x0,0x3f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x40,0x0,0x3f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x20,0x0,0x1f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0xf,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x10,0x0,0xf,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xc0,0x10,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x8,0x0,0x7,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0x80,0x20,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x7,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0x0,0x20,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x4,0x0,0x3,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0x0,0x40,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x2,0x0,0x1,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xfe,0x0,0x40,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x2,0x0,0x1,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xfe,0x0,0x80,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x1,0x0,0x0,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xfc,0x0,0x80,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x1,0x0,0x0,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xfc,0x1,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x1,0x80,0x0,0x7f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xf8,0x1,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x80,0x0,0x7f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xf8,0x2,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0xc0,0x0,0x7f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xf0,0x2,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0xc0,0x0,0x3f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xf0,0x6,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x40,0x0,0x3f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xe0,0x4,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x60,0x0,0x1f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xe0,0x4,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x60,0x0,0x1f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xc0,0xc,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x60,0x0,0x1f,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xc0,0xc,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x60,0x0,0xf,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xc0,0x8,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x30,0x0,0xf,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x80,0x8,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x30,0x0,0xf,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x80,0x18,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x30,0x0,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x80,0x18,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x30,0x0,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x0,0x18,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x30,0x0,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x0,0x18,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x30,0x0,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x0,0x18,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x70,0x0,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfe,0x0,0x18,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x70,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfe,0x0,0x18,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x70,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfe,0x0,0x18,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x70,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfe,0x0,0x18,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xf0,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x18,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x1c,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x1c,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x1c,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x3e,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x1e,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x7,0x80,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0xe,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x1e,0x1,0xe0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0xf,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xc0,0x70,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x7,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xf0,0x38,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0xf8,0xc,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xfe,0x6,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0x2,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0x3,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x7f,0xff,0x3,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xfc,0x1e,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x84,0x7f,0xff,0x3,0x7,0xff,0xff,0xf0,
0xff,0xff,0xff,0xf8,0x7f,0x80,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc,0x7f,0xfe,0x2,0xf,0xff,0xff,0xf0,
0xff,0xff,0xff,0xf0,0xff,0xe0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1e,0x7f,0xfe,0x0,0xf,0xff,0xff,0xf0,
0xff,0xff,0xff,0xe1,0xff,0xf0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x1e,0x3f,0xfc,0x0,0x3,0xff,0xff,0xf0,
0xff,0xff,0xff,0xc3,0xff,0xf8,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x3e,0x1f,0xf0,0x0,0x1,0xff,0xff,0xf0,
0xff,0xff,0xff,0xc7,0xff,0xfc,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x3e,0xf,0xe0,0xf,0xe0,0xff,0xff,0xf0,
0xff,0xff,0xff,0x87,0xff,0xfe,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0x2,0x0,0x1f,0xf8,0x7f,0xff,0xf0,
0xff,0xff,0xff,0xf,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0x80,0x0,0x3f,0xfc,0x7f,0xff,0xf0,
0xff,0xff,0xfe,0x1f,0xff,0xff,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x7f,0x80,0x0,0xff,0xfc,0x3f,0xff,0xf0,
0xff,0xff,0xf8,0x3f,0xff,0xff,0x80,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xc0,0x3,0xff,0xfe,0x3f,0xff,0xf0,
0xff,0xff,0xc0,0x7f,0xff,0xff,0x80,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xf0,0xf,0xff,0xfe,0x3f,0xff,0xf0,
0xff,0xff,0x0,0xff,0xff,0xff,0xc0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xf0,
0xff,0xfc,0x3,0xff,0xff,0xff,0xc0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xf0,
0xff,0xf0,0x1f,0xff,0xff,0xff,0xe0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xf0,
0xff,0xe0,0xff,0xff,0xff,0xff,0xe0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xf,0xff,0xf0,
0xff,0xe1,0xff,0xff,0xff,0xff,0xf0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xf0,
0xff,0xc3,0xff,0xff,0xff,0xff,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xf8,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xf0,
0xff,0x87,0xff,0xff,0xff,0xff,0xf8,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0x87,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xfc,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xfc,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xfe,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xfe,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0x80,0x1,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xc0,0x1,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xfc,0x3f,0xf0,
0xff,0x87,0xff,0xff,0xff,0xff,0xff,0xc0,0x3,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xe0,0x7,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xfe,0x1f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xf0,0xf,0xff,0xff,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xff,0xff,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xf,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xfc,0x3f,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xfe,0x1f,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0xf,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0xf,0xf0,
0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0x87,0xff,0xff,0xff,0xff,0xfe,0xf,0xff,0xff,0xff,0xff,0xff,0xfe,0x1f,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xff,0xf8,0xf,0xff,0xff,0xff,0xff,0xff,0xf8,0x3f,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xe0,0xf,0xff,0xff,0xff,0xff,0xff,0xf0,0x7f,0xf0,
0xff,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7f,0xff,0xff,0xff,0x80,0x1f,0xff,0xff,0xff,0xff,0xff,0xc0,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x1f,0xff,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0x3,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x3,0xff,0xff,0xf0,0x0,0x1f,0xff,0xff,0xff,0xff,0xfc,0x7,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x3f,0xfe,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xf0,0x1f,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xc0,0x7f,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0x1,0xff,0xff,0xf0,
0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xfc,0x7,0xff,0xff,0xf0,
0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xf8,0x1f,0xff,0xff,0xf0,
0xff,0x87,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xf0,0x7f,0xff,0xff,0xf0,
0xff,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xf0,
0xff,0xe0,0xf,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xf0,
0xff,0xf0,0x0,0xf,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0x87,0xff,0xff,0xff,0xf0,
0xff,0xfc,0x0,0x0,0x7f,0xff,0xff,0xff,0xf8,0x0,0x1f,0xff,0xf0,0x0,0x3f,0xff,0xff,0xff,0xf,0xff,0xff,0xff,0xf0,
0xff,0xff,0xe0,0x0,0x7,0xff,0xff,0xff,0xf8,0x7,0xff,0xff,0xff,0xfe,0x1f,0xff,0xff,0xfe,0x1f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xc0,0x0,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xff,0xfc,0x3f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0x0,0x3f,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xf,0xff,0xff,0xf8,0x7f,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xf0,0xf,0xff,0xff,0xc3,0xff,0xff,0xff,0xff,0xff,0x8f,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xfe,0x3,0xff,0xff,0x87,0xff,0xff,0xff,0xff,0xff,0x87,0xff,0xff,0xc1,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0x80,0x3f,0xfe,0xf,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0x83,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xe1,0xff,0xfe,0x7,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xf0,0x7f,0xf8,0x1f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xf,0x80,0x3f,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x3f,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0
};
 
// Setup
void setup() {
  tft.begin();
  Serial.begin(9600);
}
 
// Loop
void loop() {
    
  tft.drawRectangle(0, 0, tft.maxX() - 1, tft.maxY() - 1, COLOR_WHITE);
  tft.setFont(Terminal6x8);
  tft.drawText(10, 10, "hello!");
  delay(1000);
  
  tft.clear();
  tft.drawText(10, 20, "clear");
  delay(1000);
 
  tft.drawText(10, 30, "text small");
  tft.setBackgroundColor(COLOR_YELLOW);
  tft.setFont(Terminal12x16);
  tft.drawText(90, 30, "BIG", COLOR_RED);
  tft.setBackgroundColor(COLOR_BLACK);
  tft.setFont(Terminal6x8);
  delay(1000);
 
  tft.drawText(10, 40, "setBacklight off");
  delay(500);
  tft.setBacklight(LOW);
  delay(500);
  tft.setBacklight(HIGH);
  tft.drawText(10, 50, "setBacklight on");
  delay(1000);
 
  tft.drawRectangle(10, 10, 110, 110, COLOR_BLUE);
  tft.drawText(10, 60, "rectangle");
  delay(1000);
 
  tft.fillRectangle(20, 20, 120, 120, COLOR_RED);
  tft.drawText(10, 70, "solidRectangle");
  delay(1000);
 
  tft.drawCircle(80, 80, 50, COLOR_YELLOW);
  tft.drawText(10, 80, "circle");
  delay(1000);
 
  tft.fillCircle(90, 90, 30, COLOR_GREEN);
  tft.drawText(10, 90, "solidCircle");
  delay(1000);
 
  tft.drawLine(0, 0, tft.maxX() - 1, tft.maxY() - 1, COLOR_CYAN);
  tft.drawText(10, 100, "line");
  delay(1000);
 
  for (uint8_t i = 0; i < 127; i++)
    tft.drawPixel(random(tft.maxX()), random(tft.maxY()), random(0xffff));
  tft.drawText(10, 110, "point");
  delay(1000);
 
  for (uint8_t i = 0; i < 4; i++) {
    tft.clear();
    tft.setOrientation(i);
    tft.drawRectangle(0, 0, tft.maxX() - 1, tft.maxY() - 1, COLOR_WHITE);
    tft.drawText(10, 10, "setOrientation (" + String("0123").substring(i, i + 1) + ")");
    tft.drawRectangle(10, 20, 50, 60, COLOR_GREEN);
    tft.drawCircle(70, 80, 10, COLOR_BLUE);
    tft.drawLine(30, 40, 70, 80, COLOR_YELLOW);
    delay(1000);
  }
 
  tft.setOrientation(0);
  tft.clear();
  tft.drawText(10, 100, "drawing bitmap");
  delay(1000);
  tft.clear();
  tft.setBackgroundColor(COLOR_BLACK);
  tft.drawBitmap(0, 0, tux, 180, 220, COLOR_WHITE);
  delay(5000);
  
  tft.setOrientation(0);
  tft.clear();
  tft.setFont(Terminal12x16);
  tft.setBackgroundColor(COLOR_YELLOW);
  tft.drawText(10, 40, "bye!", COLOR_RED);
  tft.setBackgroundColor(COLOR_BLACK);
  tft.setFont(Terminal6x8);
  delay(1000);
  
  tft.drawText(10, 60, "off");
  delay(1000);
  
  tft.setBacklight(false);
  tft.setDisplay(false);
  
  while(true);
}

Video

Nếu hiện được như hình trên thì các bạn đã thành công trong bước đầu cài đặt rồi đấy =))), chúc các bạn “vọc” vui vẻ với module LCD này.

Bình luận
Nội dung này chưa có bình luận, hãy gửi cho chúng tôi bình luận đầu tiên của bạn.
VIẾT BÌNH LUẬN