TcMenu / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
293 stars 24 forks source link

Adafruit_SPITFT error with ST77xx screen #312

Closed THAWINKELS closed 1 year ago

THAWINKELS commented 1 year ago

When generating an code for an TFT ST7735 screen my Arduino IDE gives the error @file tcMenuAdaFruitGfx.h

tcMenuAdaFruitGfx.h:108:26: error: variable or field 'drawCookieCutBitmap' declared void void drawCookieCutBitmap(Adafruit_SPITFT gfx, int16_t x, int16_t y, const uint8_t bitmap, int16_t w, ^~~~~~~

Does anyone know where this error is from?

davetcc commented 1 year ago

Have you checked all libraries and the UI are up to date? Please check all versions. What is the environment that you are using?

Also, if you've upgraded from an older version, make sure you've run code generator at least once.

THAWINKELS commented 1 year ago

Hi,

All the libary's are updated to the last (see picture) image

I'm working om Windows 8 x64, Arduino IDE with Arduino UNO.

Adafruit_GFX libary is on version 1.11.5

image

davetcc commented 1 year ago

Graphical displays other than OLED using the SSD1306Ascii are not supported on Uno, there is not enough memory.

Even if you got past the compile error, it would not link due to a lack of available memory. The smallest 8-bit board that works for graphical displays is MEGA2560 and we test that case with ST7735

THAWINKELS commented 1 year ago

Thank u for the information.

But when I choose Arduino Mega 2560, I get the same error. How can I get rid of that?

davetcc commented 1 year ago

OK, can you please zip up a test project and attach it so I can look at what's got generated?

davetcc commented 1 year ago

BTW - Uno works well with LCD displays that are wired directly (EG DfRobot shield for example) and also for OLED using SSD1306Ascii. We even have products running live on Uno with a direct LCD connection!

THAWINKELS commented 1 year ago

Hey I tried to compile again after PC restart and I don't get any error. When I select Uno I get space error.

Thank you, I will try later with an Arduino Mega.

davetcc commented 1 year ago

Ah yes, the old IDE does not update, you often need to close and reopen the project if a file changes outside. The new 2.0 IDE and platformIO do not have this limitation.

THAWINKELS commented 1 year ago

Hey,

I'm currently testing with an arduino mega2560 but the error is back, I only changed the pins in the code generator. See attachment.

DisplayMenuTest.zip

THAWINKELS commented 1 year ago

image Adafruit_ST7735 gfx(10, 9, 8); (libary is up to date) Gives the error

When I change the display type: image

Adafruit_ILI9341 gfx(10, 9, 8); There is no error.

So something with the ST7735 libary is wrong. I deleted all ST7735 libarys and install them again, error is gone.

THAWINKELS commented 1 year ago

IMG20230302224725

When I load the sample program (change some pin settings) I don't see the right menu text, Do I miss something?

Inside the menu, the text is better: image

davetcc commented 1 year ago

What platform is selected in designer, that looks like a progmem issue. It must be set to AVR for Mega and Uno.

THAWINKELS commented 1 year ago

Thanks!

davetcc commented 1 year ago

Can we close this now?

davetcc commented 1 year ago

Assuming this was fixed by moving to using the right platform? If not please reopen.