about gpio33 and 27 question

dssman
Posts: 17
Joined: Thu May 26, 2022 4:37 pm

about gpio33 and 27 question

Postby dssman » Mon Sep 12, 2022 2:26 am

Hi everyone,
the GFX for Arduino used GPIO27 and 33, for DC and RST, can it be changed ?say : RST = 12?
thanks
Adam

ESP_LJH
Posts: 387
Joined: Tue May 18, 2021 9:21 am

Re: about gpio33 and 27 question

Postby ESP_LJH » Tue Sep 13, 2022 6:54 am

Yes, you could use GPIO12 as RESET and make sure hardware connection is also altered.

dssman
Posts: 17
Joined: Thu May 26, 2022 4:37 pm

Re: about gpio33 and 27 question

Postby dssman » Tue Sep 13, 2022 6:22 pm

Thank you.
what this line meaning:
Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 3 /* rotation */, false /* IPS */);
does it mean: DF_GFX_RST = 3 ?
this from the example code of the library: GFX for Arduino

User avatar
gtjoseph
Posts: 92
Joined: Fri Oct 15, 2021 10:55 pm

Re: about gpio33 and 27 question

Postby gtjoseph » Wed Sep 14, 2022 12:08 pm

3 is the screen rotation

dssman
Posts: 17
Joined: Thu May 26, 2022 4:37 pm

Re: about gpio33 and 27 question

Postby dssman » Wed Sep 14, 2022 6:53 pm

DF_GFX_RST = ?

User avatar
gtjoseph
Posts: 92
Joined: Fri Oct 15, 2021 10:55 pm

Re: about gpio33 and 27 question

Postby gtjoseph » Wed Sep 14, 2022 11:15 pm

dssman wrote:
Wed Sep 14, 2022 6:53 pm
DF_GFX_RST = ?
It's hard to tell because I don't know exactly what "GFX for Arduino" library you're talking about. Got a link?

dssman
Posts: 17
Joined: Thu May 26, 2022 4:37 pm

Re: about gpio33 and 27 question

Postby dssman » Thu Sep 15, 2022 3:15 am


User avatar
gtjoseph
Posts: 92
Joined: Fri Oct 15, 2021 10:55 pm

Re: about gpio33 and 27 question

Postby gtjoseph » Thu Sep 15, 2022 3:34 pm

If youi look in that library's Arduino_GFX_Library.h file you'll see

Code: Select all

#define DF_GFX_RST GFX_NOT_DEFINED
It appears that DF_GFX_RST should be assigned to the GPIO that's connected to the display's RESET pin if it has one so in your code, you'll have to do something like...

Code: Select all

#undef DF_GFX_RST
#define DF_GFX_RST GPIO_NUM_nn 
where "nn" is the actual gpio number connected.

You'll probably want to direct any further questions about using this library to the library maintainers.

dssman
Posts: 17
Joined: Thu May 26, 2022 4:37 pm

Re: about gpio33 and 27 question

Postby dssman » Thu Sep 15, 2022 6:38 pm

Thank you a lot gtjoseph.
As you checked into the Library file, I'd like to ask some thing confused me, that are:

1. seems the ESP32 goes into two totally different branches? I have two laptops one is WIN7; and the other one is WIN10 with the Arduino core for the ESP updated. some sketches be able to compile in WIN7 only and some sketches can be compiled in WIN10 only, why?

2. the pin combination for DC/RST, some code with: DC=2, RST=4, (can be any pin? ) works well; but no work at all as long as changed setting as DC=27, RST = 33 (GFX_Arduino need), why?

3. on WIN10 used a ESP32-WROOM-32 board: the example from GFX LIBRARY FOR ARDUINO compiling well when selected board: ESP32-WROOM-DA MODULE, but got compiling errors when selected ESP32 Dev Module, why?
the same board be able to compile when selected ESP32-Dev Module with other sketch which doesn't use GFX FOR ARDUINO library.

Best.
Adam

User avatar
gtjoseph
Posts: 92
Joined: Fri Oct 15, 2021 10:55 pm

Re: about gpio33 and 27 question

Postby gtjoseph » Fri Sep 16, 2022 11:09 am

dssman wrote:
Thu Sep 15, 2022 6:38 pm
Thank you a lot gtjoseph.
As you checked into the Library file, I'd like to ask some thing confused me, that are:

1. seems the ESP32 goes into two totally different branches? I have two laptops one is WIN7; and the other one is WIN10 with the Arduino core for the ESP updated. some sketches be able to compile in WIN7 only and some sketches can be compiled in WIN10 only, why?
I have no idea. I don't use Windows or the Arduino core. Sorry.
dssman wrote:
Thu Sep 15, 2022 6:38 pm
2. the pin combination for DC/RST, some code with: DC=2, RST=4, (can be any pin? ) works well; but no work at all as long as changed setting as DC=27, RST = 33 (GFX_Arduino need), why?
The library itself shouldn't care which actual GPIOs you're using as long as they're appropriate for the ESP32 module/board you're using. I think they just used 27/33 as defaults or examples.
dssman wrote:
Thu Sep 15, 2022 6:38 pm
3. on WIN10 used a ESP32-WROOM-32 board: the example from GFX LIBRARY FOR ARDUINO compiling well when selected board: ESP32-WROOM-DA MODULE, but got compiling errors when selected ESP32 Dev Module, why?
the same board be able to compile when selected ESP32-Dev Module with other sketch which doesn't use GFX FOR ARDUINO library.
I don't use the library so I can't help you here either, sorry.

Who is online

Users browsing this forum: No registered users and 29 guests