moononournation / Arduino_GFX

Arduino GFX developing for various color displays and various data bus interfaces
Other
807 stars 158 forks source link

Error: expected type-specifier before 'Arduino_ESP32PAR8' using ESP32 with R61529 chip #98

Closed drewgandy closed 2 years ago

drewgandy commented 2 years ago

Hi, I am trying to use the basic Hello World example with an ESP32 and a 8-bit parallel display using the R61529 chip.

I have the following declarations:

Arduino_DataBus* bus = new Arduino_ESP32PAR8(27 /* DC */, 5 /* CS */, 26 /* WR */, -1 /* RD */, 16 /* D0 */, 17 /* D1 */, 18 /* D2 */, 19 /* D3 */, 21 /* D4 */, 12 /* D5 */, 23 /* D6 */, 25 /* D7 */);
Arduino_GFX* gfx = new Arduino_R61529(bus, 32, 0 /* rotation */, true /* IPS */);

and am getting this error:

eSPI_Test2.ino: 27:28: error: expected type-specifier before 'Arduino_ESP32PAR8 Arduino_DataBus bus = new Arduino_ESP32PAR8(27 * DC \, 5 * CS \, 26 * WR \, -1 * RD \, 16 * D0 \, 17 * D1 \, 18 * D2 \, 19 * D3 \, 21 * D4 \, 12 * D5 \, 23 * D6 \, 25 * D7 *)

Do you have any insight into what is causing this issue?

I am using Visual Micro in Visual Studio, but the same error appears in the Arduino IDE.

This is the display

Thanks,

moononournation commented 2 years ago

what dev board you selected?

drewgandy commented 2 years ago

The ESP32 Dev Board . Issue happens whether I select the Node32s or ESP32 Dev Module in the IDE.

moononournation commented 2 years ago

just checked with latest code no this compilation error. You may try get the latest Arduino_GFX and double check no duplicate folders under Arduino/libraries

drewgandy commented 2 years ago

Turns out I had some old, unrelated cpp files in subfolders that were causing conflicts. Once those were deleted it compiled fine. Sorry for the confusion and I appreciate your responsiveness.

The 'Hello World' still isn't showing up on the screen (even though @daumemo's bit-bang test program worked) so I will try some different pin configurations.

drewgandy commented 2 years ago

As a follow up, I loaded up the Hello World example, using the default bus pins in your wiki, with the only change being the reset pin in the GFX parameters, using pin 15 instead of pin 7 because pin 7 is part of the onboard SPI flash.

Arduino_DataBus *bus = new Arduino_ESP32PAR8(27 /* DC */, 5 /* CS */, 26 /* WR */, -1 /* RD */,
    16 /* D0 */, 17 /* D1 */, 18 /* D2 */, 19 /* D3 */, 21 /* D4 */, 12 /* D5 */, 23 /* D6 */, 25 /* D7 */);
Arduino_GFX *gfx = new Arduino_R61529(bus, 15 /* RST */, 0 /* rotation */, true /* IPS */);

The program uploads fine, but the screen is totally blank (backlight does come on) and 'HELLO WORLD' does not show up.

Any thoughts on what the issue may be?

moononournation commented 2 years ago

I remember all unused pins require pullup or pulldown according to the datasheet.

drewgandy commented 2 years ago

Interesting. I'll take a look. I didn't catch that when looking at daumemo's blog. Thanks again!

ericcastro commented 2 years ago

I am also having this problem but I checked for duplicate folders and everything seems fine. I can't get rid of it. any ideas ?

moononournation commented 2 years ago

IMG_1526 R61529 I just tested the latest code and all works well. I am not sure what you are missing, let me share my connection setting:

5 - GND
6 - VCC
7 - VCC
9 - GND
10 - GPIO32
11 - GPIO21
15 - GPIO33
17 - GPIO19
18 - GPIO23
19 - GPIO18
20 - GPIO5
21 - GPIO17
22 - GPIO16
23 - GPIO25
24 - GPIO26
33 - VCC
37 - GND
38 - GND
39 - GND
40 - VCC

And the declaration code:

Arduino_DataBus *bus = new Arduino_ESP32PAR8(
     32 /* DC */, GFX_NOT_DEFINED /* CS */, 21 /* WR */, GFX_NOT_DEFINED /* RD */,
     19 /* D0 */, 23 /* D1 */, 18 /* D2 */, 5 /* D3 */, 17 /* D4 */, 16 /* D5 */, 25 /* D6 */, 26 /* D7 */
);
Arduino_GFX *gfx = new Arduino_R61529(bus, 33 /* RST */, 0 /* rotation */, true /* IPS */);
moononournation commented 2 years ago

If your dev board have PSRAM, you should avoid those pins, e.g.:

Arduino_DataBus *bus = new Arduino_ESP32PAR8(TFT_DC, TFT_CS, 25 /* WR */, 32 /* RD */, 23 /* D0 */, 19 /* D1 */, 18 /* D2 */, 26 /* D3 */, 21 /* D4 */, 4 /* D5 */, 0 /* D6 */, 2 /* D7 */);
ericcastro commented 2 years ago

to update on this issue, I was able to make it work in a different computer where my arduino setup is alot simpler.

this makes me believe that problem arises from conflicts with other libraries, although I couldn't say which one for now.

moononournation commented 2 years ago

glad to hear that