Блоки для 2,4' TFT Shield UNO-Mega
Добавлено: 17 апр 2024, 13:44
MTSnik10
Подключил TFT Shield к шилду esp32. Наигравшись с текстом, полосками, кругами и квадратиками, решил вывести изображение. Родная картинка из блока отобразилась с параметрами W-40 и H-40. Попытался создать свою картинку 32х32 Выводит что-то непонятное. Пытался вставить с заведомо известным разрешением код картинки (например SemiCircle size: 50W*25H
0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0xff, 0x80, 0x00, 0x00,
0x00, 0x03, 0xff, 0xff, 0xf0, 0x00, 0x00,
0x00, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0x00,
0x00, 0x1f, 0x80, 0x00, 0x7e, 0x00, 0x00,
0x00, 0x7e, 0x00, 0x00, 0x1f, 0x80, 0x00,
0x00, 0xf8, 0x00, 0x00, 0x07, 0xc0, 0x00,
0x01, 0xf0, 0x00, 0x00, 0x03, 0xe0, 0x00,
0x03, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x00,
0x07, 0x80, 0x00, 0x00, 0x00, 0x78, 0x00,
0x07, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00,
0x1e, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
0x3c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80,
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80,
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80,
0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0 }; )
Но всё равно изображение не открывается.
Автор отзовитесь, каким разрешением Вы вставляли картинку. Или как то можно вырезав из ide код картинки узнать разрешение?
Блоки для 2,4' TFT Shield UNO-Mega
Добавлено: 06 июн 2024, 15:26
OLYa
вопрос в чем ошибка ?.скаченных блоков по ссылке выше.блоки GLUE glassа работают, а вот что выдает компилятор при использовании раздела MCU. вот все что выделилось красным после попытки компилировать. все блоки обшарила так и не нашла где это. эта ошибка выпадает при использовании даже одного главного блока. заранее спасибо если кто откликнется на просьбу...
C:\Users\Katrin\AppData\Local\Temp\flprog\pr5\pr5.ino: In function 'void setup()':
pr5:188:5: error: 'tft' was not declared in this scope
tft.reset();
^~~
C:\Users\Katrin\AppData\Local\Temp\flprog\pr5\pr5.ino: In function 'void loop()':
pr5:208:9: error: 'tft' was not declared in this scope
tft.fillCircle(Ox_104002918_1, Oy_104002918_1, Or_104002918_1, FillColor);
^~~
pr5:223:17: error: 'tft' was not declared in this scope
CursX = tft.getCursorX(); // Текущее положение курсора по Х
^~~
pr5:239:9: error: 'tft' was not declared in this scope
tft.drawCircle(Ox_5877155_1, Oy_5877155_1, Or_5877155_1, FillColor);
^~~
pr5:263:43: error: 'tft' was not declared in this scope
xpos = map(tp.x, 900, 160, 0, tft.width());
^~~
pr5:290:9: error: 'tft' was not declared in this scope
tft.invertDisplay(Color_);
^~~
pr5:305:9: error: 'tft' was not declared in this scope
tft.drawPixel(Ox_224513141_1, Oy_224513141_1, FillColor);
^~~
pr5:326:9: error: 'tft' was not declared in this scope
tft.drawRect(Ox_42160350_1, Oy_42160350_1, Ow_42160350_1, Oh_42160350_1, FillColor);
^~~
pr5:348:9: error: 'tft' was not declared in this scope
tft.drawFastHLine(Ox_103345116_1, Oy_103345116_1, Ow_103345116_1, FillColor);
^~~
pr5:370:9: error: 'tft' was not declared in this scope
tft.fillRect(Ox_199951395_1, Oy_199951395_1, Ow_199951395_1, Oh_199951395_1, FillColor);
^~~
pr5:397:9: error: 'tft' was not declared in this scope
tft.drawTriangle(Ox1_60595784_1, Oy1_60595784_1, Ox2_60595784_1, Oy2_60595784_1, Ox3_60595784_1, Oy3_60595784_1, FillColor);
^~~
pr5:423:9: error: 'tft' was not declared in this scope
tft.fillRoundRect(Ox_94150837_1, Oy_94150837_1, Ow_94150837_1, Oh_94150837_1, Or_94150837_1, FillColor);
^~~
pr5:445:9: error: 'tft' was not declared in this scope
tft.fillRect(Ox_245392644_1, Oy_245392644_1, Ow_245392644_1, Oh_245392644_1, FillColor);
^~~
pr5:469:9: error: 'tft' was not declared in this scope
tft.drawLine(Ox1_236450582_1, Oy1_236450582_1, Ox2_236450582_1, Oy2_236450582_1, FillColor);
^~~
pr5:491:9: error: 'tft' was not declared in this scope
tft.setTextColor(FillColor); // Цвет фона из блока Чипсет.
^~~
pr5:533:9: error: 'tft' was not declared in this scope
tft.drawRoundRect(Ox_52965562_1, Oy_52965562_1, Ow_52965562_1, Oh_52965562_1, Or_52965562_1, FillColor);
^~~
pr5:559:9: error: 'tft' was not declared in this scope
tft.fillTriangle(Ox1_122858130_1, Oy1_122858130_1, Ox2_122858130_1, Oy2_122858130_1, Ox3_122858130_1, Oy3_122858130_1, FillColor);
^~~
pr5:583:9: error: 'tft' was not declared in this scope
tft.drawFastVLine(Ox_153560880_1, Oy_153560880_1, Oh_153560880_1, FillColor);
^~~
Используем библиотеку Adafruit_TouchScreen версии 1.1.2 из папки: c:\Users\Katrin\Desktop\PortableFLProg_7-5-2_Win64\ideV8\portable\sketchbook\libraries\Adafruit_TouchScreen
exit status 1
'tft' was not declared in this scope