Page 1 of 1

2.5 inch tft display with touch

Posted: Tue Jun 08, 2021 4:56 am
by madhavan
hi, there is many examples but nothing is working . everything is giving compiling error .
i am trying to connect in SPI Mode 2.4 inch tft with blue pill .

please suggest correction version and library or example link .

Code: Select all

Arduino: 1.8.13 (Windows 10), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STM32duino bootloader, 72Mhz (Normal), Smallest (default)"
C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp: In member function 'int16_t Adafruit_GFX_AS::drawUnicode(uint16_t, int16_t, int16_t, int16_t)':

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:142:9: error: 'textsize' was not declared in this scope

     if (textsize == 1) drawFastHLine(x, pY, width+gap, textbgcolor);

         ^

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:149:11: error: 'textsize' was not declared in this scope

       if (textsize==1){

           ^

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:173:7: error: 'textsize' was not declared in this scope

   pY+=textsize;

       ^

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:175:20: error: 'textsize' was not declared in this scope

 return (width+gap)*textsize;        // x +

                    ^

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp: In member function 'int16_t Adafruit_GFX_AS::drawCentreString(char*, int16_t, int16_t, int16_t)':

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:249:15: error: 'textsize' was not declared in this scope

     len = len*textsize;

               ^

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp: In member function 'int16_t Adafruit_GFX_AS::drawRightString(char*, int16_t, int16_t, int16_t)':

C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Adafruit_GFX_AS\Adafruit_GFX_AS.cpp:300:15: error: 'textsize' was not declared in this scope

     len = len*textsize;

               ^

Multiple libraries were found for "Wire.h"

 Used: C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\Wire

 Not used: C:\Users\ELCOT\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.3.18\libraries\WireSlave

exit status 1

Error compiling for board Generic STM32F103C series.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: 2.5 inch tft display with touch

Posted: Tue Jun 08, 2021 5:58 am
by ag123
i made a fork of Adafruit ILI9341 SPI LCD library here
note this is for ILI9341 SPI LCD, you did not mention your LCD soc and its interface
viewtopic.php?f=39&t=896
https://github.com/ag88/Adafruit_ILI9341_SPI_stm32duino

Re: 2.5 inch tft display with touch

Posted: Tue Jun 08, 2021 9:37 am
by stevestrong
You better use the original Adafruit library, the Arduino_STM32 version of that is not up to date.