코코아팹은 누구나 창의적 아이디어를 현실로 만들어 낼 수 있도록
만들고, 공유하고, 배울 수 있는 터전이
되고자 합니다.
아이디와 비밀번호를 잊으셨나요?아이디 / 비밀번호 찾기
코코아팹 회원이 아니신가요? 회원가입
아두이노 메가로 tft lcd 조작
갈배사이다 | 2021-06-08
|
|
---|---|
#include <Adafruit_TFTLCD.h> #include <pin_magic.h> #include <registers.h>
#include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_TFTLCD.h> // Hardware-specific library #include <TouchScreen.h>
#if defined(__SAM3X8E__) #undef __FlashStringHelper::F(string_literal) #define F(string_literal) string_literal #endif
#define YP A3 // must be an analog pin, use "An" notation! #define XM A2 // must be an analog pin, use "An" notation! #define YM 9 // can be a digital pin #define XP 8 // can be a digital pin
#define TS_MINX 150 #define TS_MINY 120 #define TS_MAXX 920 #define TS_MAXY 940
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
#define LCD_CS A3 #define LCD_CD A2 #define LCD_WR A1 #define LCD_RD A0 // optional #define LCD_RESET A4
// Assign human-readable names to some common 16-bit color values: #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET); int oldcolor, currentcolor;
const uint8_t myBitmap[] ={0xbd94, 0xbdb4, 0xadb3, 0xadf3, 0xa5b4, 0xa574, 0xad94, 0x3a27, 0x31c7, 0x1904, 0xacf3, 0xacf3, 0xbd95, 0xffdd, 0xef5a, 0xe739, 0xe719, 0xe71a, 0xdeb9, 0xded9, 0xdef9, 0xd6d8, 0xded8, 0xded7, 0xded8, 0xd6d8, 0xded9, 0xdeb9, 0xd6b9, 0xded9, 0xe6d9, 0xde98, 0xdeb8, 0xd6b8, 0xdeb8, 0xded8, 0xdeb8, 0xded8, 0xe6f9, 0xe719, 0xe6f9, 0xef19, 0xef3a, 0xef3a, 0xbdb4, 0xb593, 0xadb3, 0xa5f4, 0x9df5, 0xa617, 0x8d54, 0x3228, 0x0903, 0x740f, 0x842f, 0x9cb1, 0xad74, 0xfffe, 0xf7bb, 0xef7a, 0xef5a, 0xef3a, 0xded9, 0xd6b8, 0xd6d8, 0xd6d8, 0xd6b7, 0xded8, 0xded8, 0xd6d8, 0xdeb9, 0xded9, 0xce98, 0xdef9, 0xde98, 0xdeb8, 0xd697, 0xd6b8, 0xded8, 0xd6b8, 0xd697, 0xd698, 0xdeb8, 0xdeb8, 0xe6f9, 0xe6d8, 0xe6d8, 0xe6f9, 0xbd92, 0xbdd3, 0xadd4, 0x8db4, 0x7df6, 0x8699, 0x8618, 0x9659, 0x7d14, 0x9595, 0x9db4, 0xb656, 0xbeb8, 0xdf5b, 0xef9c, 0xef9c, 0xf79c, 0xef3a, 0xdef9, 0xdef9, 0xd6b8, 0xd6d7, 0xd697, 0xd6b7, 0xd6d8, 0xdf19, 0xd6d8, 0xd6b8, 0xd6d8, 0xd6b8, 0xded7, 0xded7, 0xd6b7, 0xd6b8, 0xd6b8, 0xd697, 0xd697, 0xe6f9, 0xef5a, 0xf77b, 0xe719, 0xe6d8, 0xded8, 0xe719, 0xbd91, 0xb592, 0xa5b3, 0xb71a, 0x6575, 0x86db, 0x6db6, 0x7dd7, 0x7513, 0x642f, 0x9593, 0x8d32, 0xae57, 0x8d33, 0xb5f6, 0xfffe, 0xf79c, 0xef3a, 0xe719, 0xdeb8, 0xd6d8, 0xd6b8, 0xded9, 0xd6b8, 0xd6d8, 0xd6d8, 0xdeb8, 0xded8, 0xd6b7, 0xd6d7, 0xd6b7, 0xd6b7, 0xd6b8, 0xd6b8, 0xd6b8, 0xd697, 0xd677, 0xd697, 0xded8, 0xdef9, 0xe6f9, 0xdeb8, 0xdeb8, 0xdef8, 0xbd92, 0xbdb3, 0xa5b4, 0xae77, 0x6d54, 0xbfff, 0xaf1c, 0x53ef, 0x3acb, 0x532c, 0x9d74, 0x9d53, 0x9553, 0xf7ff, 0xf7fe, 0xffde, 0xf7bc, 0xff9c, 0xe6d9, 0xdeb9, 0xe71b, 0xc617, 0xe6fb, 0xf75c, 0xe6fa, 0xded9, 0xe6f9, 0xe6f9, 0xdef8, 0xded8, 0xd697, 0xd697, 0xd677, 0xce77, 0xd697, 0xd697, 0xd677, 0xd677, 0xd677, 0xd677, 0xdeb8, 0xdeb8, 0xded8, 0xdef8, 0xbd72, 0xb592, 0xadd4, 0x9573, 0x8d94, 0x95d6, 0x8534, 0x1966, 0x1925, 0x10e4, 0x52ea, 0x8cb1, 0x8cb0, 0xfffe, 0xfffe, 0xffde, 0xffdd, 0xf79c, 0xf79d, 0xa4f3, 0x8410, 0x6b2d, 0x62ec, 0x41c8, 0xbdd6, 0xe71b, 0xe6f9, 0xe6f9, 0xded8, 0xded8, 0xce57, 0xd697, 0xd697, 0xce56, 0xce56, 0xce77, 0xce56, 0xce36, 0xce56, 0xce57, 0xd677, 0xd698, 0xdeb8, 0xded8, 0xb573, 0xb572, 0xb5b3, 0xad93, 0xa573, 0x9d13, 0x8c92, 0x2986, 0x5aed, 0x7bf0, 0x5aca, 0x9cf1, 0x948f, 0xfffd, 0xffde, 0xfffe, 0xf7dd, 0xf7dd, 0x5aea, 0x6b2c, 0x630c, 0x630c, 0x62ec, 0x3166, 0x0841, 0xe71b, 0xef5b, 0xe71a, 0xded8, 0xded9, 0xd6b9, 0xd678, 0xce77, 0xce56, 0xce77, 0xd677, 0xd677, 0xd677, 0xd697, 0xd697, 0xd698, 0xdeb8, 0xded8, 0xded8, 0xb572, 0xb592, 0xb5b3, 0xad72, 0xad32, 0xad12, 0x8c30, 0x2946, 0x31a8, 0x4209, 0x4207, 0x948f, 0x948f, 0xffbb, 0xef3b, 0xffbe, 0xfffe, 0x9cf2, 0x0840, 0x18a1, 0x20a2, 0x2904, 0x2904, 0x3986, 0x2944, 0x7bee, 0xf79c, 0xe71a, 0xe71a, 0xd6d9, 0xd698, 0xd698, 0xd677, 0xd677, 0xd697, 0xce77, 0xce56, 0xd677, 0xd697, 0xd698, 0xdeb8, 0xdeb8, 0xded8, 0xded8, 0xad51, 0xb572, 0xb572, 0xad52, 0xad12, 0xad13, 0x73af, 0x18e5, 0x2988, 0x5b0d, 0x4207, 0x946f, 0x8c4e, 0xd6b7, 0xd698, 0xe71b, 0xbdf6, 0x0000, 0x1880, 0x3963, 0x6aa8, 0x6288, 0x41a5, 0x28e2, 0x3144, 0x630a, 0xf79c, 0xe73a, 0xdef9, 0xded9, 0xd678, 0xd698, 0xd677, 0xd677, 0xd677, 0xd677, 0xce77, 0xd677, 0xd677, 0xd697, 0xd697, 0xdeb8, 0xdeb8, 0xdeb8, 0xad72, 0xb592, 0xad52, 0xb552, 0xad12, 0xad13, 0x634d, 0x29a8, 0x31c9, 0x632e, 0x39e7, 0x842e, 0x8c4e, 0xc614, 0xce77, 0xd678, 0xacf2, 0x4184, 0x49c4, 0x6266, 0x9bcb, 0x938b, 0x59e4, 0x8bac, 0x5226, 0x5227, 0xffbc, 0xe75a, 0xe73a, 0xded8, 0xde98, 0xd657, 0xce57, 0xce56, 0xce56, 0xce56, 0xce56, 0xce56, 0xce77, 0xd677, 0xd697, 0xd698, 0xd698, 0xd697, 0xad52, 0xb572, 0xad32, 0xa512, 0xa512, 0x9cd2, 0xad75, 0x9492, 0x9472, 0x2945, 0x18e3, 0x738d, 0x8c2e, 0xb593, 0xc636, 0xad12, 0x834b, 0xa40e, 0xa42e, 0x8b49, 0x9329, 0x9349, 0x8b29, 0x938b, 0xac6f, 0x6287, 0xd656, 0xf79b, 0xe719, 0xded9, 0xde98, 0xce37, 0xce57, 0xce56, 0xce36, 0xce36, 0xce36, 0xce36, 0xce56, 0xd677, 0xd697, 0xd698, 0xd6b8, 0xd6b8, 0xad32, 0xb553, 0xad12, 0xa532, 0x9cf1, 0xa512, 0x52a9, 0x39a6, 0xc5b7, 0xb555, 0x62eb, 0x5b0b, 0x8c2e, 0xb552, 0xce35, 0x9c2e, 0x936c, 0x9b6b, 0xcd11, 0xa3ab, 0x8ae8, 0x8ac7, 0x8ae8, 0x936a, 0xb48e, 0x8349, 0xbd92, 0xffdc, 0xe73a, 0xe719, 0xd678, 0xde98, 0xce57, 0xce36, 0xce36, 0xce36, 0xce36, 0xce36, 0xce56, 0xce56, 0xce56, 0xd677, 0xd697, 0xd697, 0xad11, 0xad52, 0xa512, 0xa4f2, 0xa533, 0xa512, 0x6b2b, 0x2924, 0xb4f2, 0xbd74, 0x8c2f, 0x4a47, 0x8c0d, 0xad11, 0xd616, 0x93ac, 0x8b2a, 0xb44e, 0x9bac, 0x938b, 0x7a67, 0x7a46, 0x82a7, 0x82c8, 0xac2d, 0x8369, 0xf759, 0xf7bb, 0xef7b, 0xded9, 0xd698, 0xce37, 0xce37, 0xce36, 0xce36, 0xce36, 0xce36, 0xce36, 0xce36, 0xce57, 0xd657, 0xd677, 0xd698, 0xd698, 0xad52, 0xa511, 0xa512, 0xa512, 0x9cd1, 0x9cf2, 0x738d, 0x28c2, 0x61e7, 0x9bee, 0xb512, 0x41c5, 0x83ed, 0xa4d0, 0xcd94, 0xa40e, 0x9b6b, 0xccf1, 0xa42d, 0x93ab, 0x6205, 0x59c4, 0x7a86, 0x934a, 0xc4cf, 0xc510, 0xffdb, 0xf7bb, 0xf79b, 0xdef9, 0xce78, 0xce37, 0xc616, 0xc616, 0xc616, 0xce36, 0xce57, 0xce57, 0xce57, 0xce57, 0xd657, 0xd677, 0xd697, 0xd677, 0xa532, 0xa532, 0xa512, 0xa4f2, 0x9cd1, 0xa513, 0x5a8a, 0x4145, 0x71e8, 0x5904, 0x8b2c, 0x8b8c, 0x736b, 0xa4f0, 0xc593, 0x9bac, 0xa3ab, 0xb42d, 0xd5b3, 0x93cc, 0x834a, 0x8329, 0x8b29, 0x8b08, 0xbc6e, 0xb46e, 0xff7a, 0xfffc, 0xf7bc, 0xdef9, 0xce37, 0xc616, 0xc616, 0xc5f5, 0xc5f5, 0xce36, 0xce36, 0xce57, 0xce57, 0xce57, 0xd677, 0xd698, 0xd697, 0xd697, 0x9d32, 0x9cf2, 0x9cb0, 0xa4d1, 0x9c91, 0xa4d3, 0x3987, 0x38e5, 0x828a, 0x6145, 0x5965, 0xa44f, 0x83ed, 0x9cf0, 0xb4f1, 0x9bac, 0x9b8b, 0xac0d, 0xbcd0, 0x93cc, 0x7ac8, 0x61c4, 0x8287, 0xb3ed, 0xbc4e, 0xbc8f, 0xb4f0, 0xffbb, 0xbdd4, 0xb594, 0xce77, 0xc5f5, 0xc5f5, 0xc5f5, 0xc5f5, 0xce16, 0xce36, 0xce36, 0xce36, 0xce36, 0xce57, 0xd677, 0xd677, 0xd677, 0x9d12, 0x9d12, 0x9cf2, 0x9cd2, 0x9cd2, 0x9cd2, 0x8bf0, 0x6249, 0xd5b5, 0xb470, 0x5144, 0xa40f, 0x83ee, 0xa511, 0xac8f, 0x8b2a, 0xa3ac, 0xabcd, 0x82a8, 0x7a67, 0x81e5, 0x8a26, 0x9a28, 0xb34c, 0xa38b, 0xa42c, 0xc5b3, 0x5ac7, 0x2101, 0x1080, 0xad12, 0xde98, 0xd657, 0xd677, 0xce16, 0xc5f5, 0xc5f6, 0xce16, 0xce36, 0xce57, 0xce57, 0xce57, 0xce57, 0xd677, 0xad74, 0xad94, 0xa553, 0x9cf2, 0xa513, 0x9c92, 0x8bcf, 0x72cb, 0xb4b1, 0xbcd1, 0xbc91, 0x51a5, 0x83ad, 0x3984, 0x4143, 0x6206, 0x6a87, 0xa40e, 0x7226, 0x58e1, 0x8163, 0x7080, 0x88e3, 0x6881, 0x6163, 0x8b8a, 0x6b08, 0x3162, 0x3183, 0x4206, 0x3143, 0x41c5, 0x736b, 0x738c, 0xce36, 0xc5f5, 0xce36, 0xce16, 0xce37, 0xce37, 0xd657, 0xd657, 0xd677, 0xd677, 0x39a7, 0x39c7, 0x4227, 0x39e6, 0xbdd6, 0x8c10, 0x7b6d, 0x59a6, 0x82a9, 0xc491, 0xc4f2, 0x7aaa, 0x51e6, 0x5a68, 0x41a5, 0x4185, 0x2922, 0xb533, 0x61e6, 0x58e2, 0x8942, 0x90c0, 0x8861, 0x8924, 0x4040, 0x4183, 0x3143, 0x39a5, 0x41e6, 0x41e6, 0x41c5, 0x41c5, 0x2922, 0x0840, 0xdeb9, 0xd657, 0xce36, 0xce36, 0xce37, 0xce57, 0xd657, 0xd657, 0xce77, 0xd677, 0x41e8, 0x39c7, 0x4228, 0x6b8d, 0xad95, 0x8c30, 0x7b4c, 0x4944, 0x58e3, 0x71a6, 0xb42f, 0x9bce, 0x49a5, 0x41a5, 0x39a5, 0x3184, 0x2123, 0x18a0, 0x30c1, 0x50a0, 0x7080, 0xa162, 0x90e1, 0x8102, 0x5101, 0x3101, 0x3984, 0x39c5, 0x3164, 0x3985, 0x41e6, 0x4a47, 0x4a27, 0x2102, 0x2902, 0xbdd5, 0xde98, 0xce37, 0xce57, 0xd678, 0xd678, 0xd678, 0xd698, 0xd698, 0x3207, 0x3a08, 0x4a69, 0x4a48, 0xad95, 0x8c50, 0x734c, 0x4984, 0x5903, 0x6985, 0x5944, 0xbcb1, 0x5227, 0x3144, 0x39c6, 0x41e6, 0x3123, 0x28c1, 0x38e0, 0x40a0, 0x6920, 0xe42c, 0x70c0, 0x81e3, 0xb46d, 0x20a0, 0x3142, 0x2102, 0x3185, 0x39c6, 0x39a5, 0x39a4, 0x5247, 0x41c5, 0x20c1, 0x20e2, 0xd698, 0xd657, 0xd678, 0xd657, 0xd677, 0xd677, 0xd678, 0xd698, 0x3207, 0x3a28, 0x4228, 0x39e8, 0xa595, 0x8c90, 0x62ca, 0x832b, 0xa3ee, 0x69c6, 0x5143, 0x72a9, 0x5207, 0x2943, 0x39c6, 0x3984, 0x5a26, 0x6245, 0x2840, 0xbc8b, 0x6140, 0xfe71, 0x79c0, 0xfe91, 0x72a3, 0x2080, 0x28e0, 0x3143, 0x2923, 0x39c6, 0x39a5, 0x39a4, 0x41e6, 0x4a26, 0x2923, 0x2922, 0x2943, 0xdeb9, 0xce37, 0xd678, 0xd677, 0xd677, 0xd698, 0xd698, 0x4207, 0x4228, 0x4a69, 0x31a7, 0x9d54, 0x844f, 0x62a9, 0x834c, 0x9c4f, 0xbd12, 0x8b4b, 0x4985, 0x3964, 0x3144, 0x3964, 0x49c5, 0x3080, 0xbc8c, 0xcd2a, 0xfeae, 0xf62c, 0xfe4b, 0xfe8a, 0xfeab, 0x9bc3, 0xc52c, 0x4941, 0x2840, 0x41a4, 0x3164, 0x39e6, 0x31a5, 0x39a5, 0x41e6, 0x3184, 0x3164, 0x18a1, 0x6b2b, 0xe6d9, 0xce16, 0xce37, 0xce57, 0xce57, 0xce77, 0x3a06, 0x3a07, 0x39e7, 0x31a6, 0x9d54, 0x8450, 0x5a48, 0x59c6, 0xa44f, 0xb4d1, 0xbd33, 0x6ac9, 0x3144, 0x3945, 0x3944, 0x4964, 0x8b29, 0x92e5, 0xfe6f, 0xc485, 0xc485, 0xfe4a, 0xfea9, 0xf689, 0xfead, 0x9364, 0xbc2b, 0xdd72, 0x3921, 0x20e1, 0x39a5, 0x39c6, 0x39a5, 0x41c5, 0x3164, 0x39a5, 0x2923, 0x4a27, 0xe6d9, 0xce37, 0xce37, 0xce37, 0xce57, 0xce57, 0x3206, 0x3a06, 0x39e6, 0x31a6, 0x94f3, 0x8c50, 0x59c7, 0x48a1, 0x6184, 0x9bac, 0x8bcd, 0x2902, 0x3144, 0x3985, 0x3123, 0x51a4, 0x8ac8, 0x8223, 0xed6e, 0x79e0, 0x79a0, 0xdcc9, 0xd4c5, 0xe568, 0xfe8f, 0x71c0, 0xbbc9, 0xa369, 0x6a25, 0x7309, 0x2902, 0x39a5, 0x3985, 0x41c6, 0x3985, 0x3985, 0x41c5, 0x39a5, 0xded9, 0xce16, 0xce37, 0xce37, 0xce57, 0xce57, 0x31e6, 0x3a07, 0x4207, 0x31c6, 0x94f3, 0x8c30, 0x5986, 0x50e2, 0x58e1, 0x6183, 0x3102, 0x2923, 0x2903, 0x3985, 0x2902, 0x6a67, 0xb40c, 0x9b06, 0xf5ce, 0xab84, 0x9ae2, 0xed6b, 0xcc84, 0xe567, 0xf5eb, 0x71a0, 0xa325, 0xc44b, 0x8b28, 0x49c4, 0x28e1, 0x3164, 0x3985, 0x39a5, 0x39a5, 0x39a5, 0x3164, 0x7b8c, 0xd678, 0xce37, 0xce16, 0xce37, 0xce37, 0xce37, 0x3a07, 0x31e6, 0x3a07, 0x29c5, 0x8cd2, 0x840f, 0x59e6, 0x82a8, 0x8ac7, 0x59c3, 0x20c0, 0x2963, 0x3144, 0x3986, 0x3964, 0x51e4, 0xb46b, 0xe5ad, 0xfe6b, 0xfe89, 0xdd86, 0xf669, 0xf647, 0xfe88, 0xede7, 0xe5c9, 0xee0d, 0xbccb, 0x4181, 0x2922, 0x20e2, 0x31a5, 0x39c5, 0x3984, 0x3164, 0x3144, 0x62ea, 0xd678, 0xc5f6, 0xc616, 0xce16, 0xce36, 0xce37, 0xce36, 0x31a6, 0x31c6, 0x31e6, 0x2985, 0x8cd2, 0x840e, 0x4984, 0x5163, 0x9369, 0xac8e, 0x20a0, 0x20c1, 0x3965, 0x41a6, 0x2923, 0x3962, 0x28a0, 0xb486, 0xf689, 0xee86, 0xee86, 0xe665, 0xf686, 0xfea7, 0xf647, 0xf68a, 0xc528, 0x3100, 0x41a2, 0x3183, 0x2943, 0x20e2, 0x3164, 0x3984, 0x3184, 0x4a27, 0xd678, 0xc5f6, 0xc5d5, 0xce16, 0xce16, 0xce36, 0xce37, 0xce36, 0x31e7, 0x31e7, 0x31e7, 0x2165, 0x8cb1, 0x7bee, 0x3964, 0x30a0, 0x51a3, 0x8b8a, 0x4142, 0x28a0, 0x2903, 0x3164, 0x39c5, 0x3161, 0x62a5, 0xd60e, 0xdde8, 0xf6a7, 0xee85, 0xee85, 0xee25, 0xf666, 0xf688, 0xee4a, 0xff2f, 0x8364, 0x3140, 0x3984, 0x3184, 0x2102, 0x2923, 0x1880, 0x0840, 0xbdd5, 0xc5d5, 0xc5f6, 0xc616, 0xc5d5, 0xc616, 0xce16, 0xce36, 0xc636, 0x21a6, 0x29a6, 0x31c6, 0x2985, 0x8cb1, 0x7bcd, 0x3964, 0x3102, 0x51e5, 0x49a3, 0x51c4, 0x28a0, 0x28c1, 0x20c2, 0x31a4, 0x3182, 0x39a1, 0x49c0, 0xf6cd, 0xddc7, 0xeea9, 0xee88, 0xf668, 0xf628, 0xfecc, 0x7ae0, 0x8383, 0xaccb, 0x41a3, 0x3964, 0x39a5, 0x3184, 0x2923, 0x83ee, 0xa4d1, 0xc5d5, 0xbdd5, 0xbdd5, 0xc5f5, 0xc5f6, 0xc616, 0xce16, 0xce36, 0xc636, 0x29c7, 0x31e7, 0x31a6, 0x2944, 0x8c70, 0x840f, 0x3944, 0x4124, 0x6a88, 0x51c5, 0x49a4, 0x5a46, 0x49a4, 0x28c1, 0x20c1, 0x3142, 0x20a0, 0xacac, 0xcdce, 0x49c0, 0xd5ee, 0x6a60, 0xf64d, 0xabc4, 0x9ba4, 0x7b24, 0x28c0, 0x28c0, 0x4164, 0x3103, 0x2924, 0x2965, 0x2943, 0x9470, 0xc5f6, 0xb574, 0xbdb5, 0xc616, 0xc5f6, 0xc616, 0xc616, 0xce16, 0xc636, 0xc636, 0x2986, 0x2985, 0x3165, 0x3185, 0x8c71, 0x7bce, 0x30e3, 0x51a6, 0x72ca, 0x6248, 0x49a4, 0x5a66, 0x93cc, 0x7309, 0x41c5, 0x20c0, 0x49a2, 0xa44b, 0x3100, 0x3100, 0x4160, 0x3900, 0x8281, 0x9b23, 0x4100, 0x30c0, 0x3921, 0x3123, 0x30c2, 0x30e3, 0x2924, 0x2124, 0x3164, 0x5268, 0xc5f6, 0xb594, 0xbdd5, 0xbdb5, 0xc5f5, 0xc5f5, 0xc5f6, 0xc616, 0xc636, 0xc636 }; int a; int b;
void setup(void) { tft.setRotation(2); Serial.begin(9600); tft.reset(); uint16_t identifier = tft.readID();
tft.begin(identifier);
tft.fillScreen(BLACK);
pinMode(13, OUTPUT);
randomSeed(analogRead(5)); tft.setTextColor(WHITE); tft.setTextSize(2);
//---------------------------------------------------------------------------------------- tft.setRotation(3); tft.drawPixel(0,0,0xffff); for (int i = 0; i < 32; i++){ for (int j = 0;j < 44; j++){ tft.fillRect(j*7,i*7,7,7,myBitmap[a]); a += 1; } }
}
void loop(void){
} tft lcd를 이용하여 무야호~ 를 출력하는 코드입니다
아두이노 우노로 조작할 때에는 아무 문제 없던 코드가 아두이노 메가에서는 작동하지 않습니다(하얀 화면만 뜸)
이유가 무엇인가요?
제품 구매한 곳:11st.co.kr/products/3393832692?xfrom=order%5Elist&xzone=order%5Elist (tft lcd)
|
|
이전글 | 아두이노 브레드보드 없이 직렬 연결 질문 ... | 2021-06-06 |
다음글 | 아두이노 첨해보는데 자꾸오류가떠요 | 2021-06-11 |