Closed szymoni closed 4 years ago
The problem with FONTs is solved -> instead of #include <avr/pgmspace.h>, used #include
The lacking definition of analogWrite() for ESP32 in Arduino Lib, could be substituted with external LIB - https://github.com/ERROPiX/ESP32_AnalogWrite
... but there is more problems on compile now: _** [.pio\build\wemos_d1_mini32\liba1c\Waveshare ILI9486_ID6670\LCD_Bmp.cpp.o] Error 1 .pio\libdeps\wemos_d1_mini32\Waveshare ILI9486_ID6670\src\LCD_Touch.cpp: In function 'unsigned char TP_Scan(unsigned char)': .pio\libdeps\wemos_d1_mini32\Waveshare ILI9486_ID6670\src\LCD_Touch.cpp:155:56: error: cannot convert 'uint16_t {aka short unsigned int}' to 'unsigned int' for argument '1' to 'bool TP_Read_TwiceADC(unsigned int, unsigned int)' TP_Read_TwiceADC(&sTP_DEV.Xpoint, &sTP_DEV.Ypoint); ^ .pio\libdeps\wemos_d1_mini32\Waveshare ILI9486_ID6670\src\LCD_Touch.cpp:157:65: error: cannot convert 'uint16_t {aka short unsigned int}' to 'unsigned int' for argument '1' to 'bool TP_Read_TwiceADC(unsigned int, unsigned int)' } else if (TP_Read_TwiceADC(&sTP_DEV.Xpoint, &sTP_DEV.Ypoint)) { ^ .pio\libdeps\wemos_d1_mini32\Waveshare ILI9486_ID6670\src\LCD_Touch.cpp: In function 'void TP_Init(LCD_SCAN_DIR)': .pio\libdeps\wemos_d1_mini32\Waveshare ILI9486_ID6670\src\LCD_Touch.cpp:723:50: error: cannot convert 'uint16_t {aka short unsigned int}' to 'unsigned int' for argument '1' to 'void TP_Read_ADC_XY(unsigned int, unsigned int)' TP_Read_ADC_XY(&sTP_DEV.Xpoint, &sTPDEV.Ypoint);
Hi szymoni --
As you have discovered, the original Waveshare library was intended for the Arduino shield and isn't likely to compile without a number of modifications for the ESP32.
I strongly suggest you give Bodmer's excellent TFT_eSPI library a try as I understand it should be able to drive the Waveshare display on the ESP32 platform. His library is very well optimized for Espressif devices and should deliver much better performance. Note that I haven't tried running my Waveshare TFTs with TFT_eSPI yet.
If you do use TFT_eSPI, I believe you might want to try uncommenting the following line in your User_Setup_Select file: #include <User_Setups/Setup11_RPi_touch_ILI9486.h>
As for the PIO compatibility marker, I will update the library properties so that the platforms are correctly filtered. Thanks for pointing this out.
Hope that helps!
library.properties
has been updated to limit the scope to AVR architectures.
Hello,
as I can see, the ESP32 is not taken here into consideration, or?
I would really like to see this TFT working on my ESP32. In PlatformIO's library description is mentioned as Espressif32 compatible...
Thanks, SID