DustinWatts / FreeTouchDeck

For interfacing with Windows/macOS/Linux using an ESP32, a touchscreen and BLE.
https://www.youtube.com/dustinwatts
MIT License
617 stars 124 forks source link

Getting just a partly lit screen #102

Closed griffinmt closed 1 year ago

griffinmt commented 1 year ago

Where are the pins of the ESP32 defined to work the Touchscreen, in particular T_CLK,T_DIN,T_OUT,T_IRQ. I have the screen wired up for T_CLK=G18,T_DIN=G23,T_OUT=G19,T_IRQ=G27 BTW: Using a 3.5" ILI9488

DustinWatts commented 1 year ago

They are defined in User_Setup.h in the TFT_eSPI library. Also make sure you wire up the BL (Backlight) pin. Either to a pin defined in User_Setup.h or directly to 3.3V. If you hook it up to 3.3V the backlight is always lit so I do not recommend it, but it is a good way to test.

griffinmt commented 1 year ago

But these touch pins are not defined anywhere. I would add them myself, but what are they named. For examble, is it TOUCH_IRQ or TFT_T_IRQ or just _IRQ. How does the software know what pin I am using for IRQ etc.

DustinWatts commented 1 year ago

They are not defined separately if you are using the ILI9488 module, becuase both the screen and touch use SPI. You can find the correct setup in for an ESP32 with ILI9488 module here: ESP32_Dev_Kit_V1_ILI9488_Resistive.h

griffinmt commented 1 year ago

So, I dont need to physically wire any pins to the display touch screen connections other than T_CS. Is that correct?

DustinWatts commented 1 year ago

No, you also nee to wire T_DIN, T_DO, T_CS and T_CLK. Because although in software they are the same (except for T_DO, which is not used by the screen), the SPI pins on the module for the screen and the touch controller are not connected on the PCB.

griffinmt commented 1 year ago

I was going to buy your pcb for doing this, as the first one was essentially free, till I found out there was a $29 shipping fee.

griffinmt commented 1 year ago

Go some results today. I switched over to an ILI9341 display, and altered some pin assignments, and I got the button screen up!!! BUT that screen is smaller than the 88, so I only see the top two buttons and part of the two below them. Is there a way to shrink everything proportionally?

DustinWatts commented 1 year ago

Yes there is. In FreeTouchDeck.ino you can define the height and width of the screen.

@ line 157

#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 320

If you do that, everything should scale accordingly.

griffinmt commented 1 year ago

I am a dummy some times!!!

DustinWatts commented 1 year ago

If you've written the software, it is easy to find. 😉

Btw... if your screen is broken I hope you can get a replacement. And if you like you may close this issue.

griffinmt commented 1 year ago

Just an FYI: These are my current settings that work on the 9341 but not on the 9488. Will order a new one. Thanks for your help.

define TFT_MISO 19

define TOUCH_DO 19

define TFT_MOSI 23

define TOUCH_DIN 23

define TFT_SCLK 18

define TOUCH_SCLK 18

define TFT_CS 15 // Chip select control pin

define TFT_DC 27 // Data Command control pin

define TFT_RST 4 // Reset pin (could connect to RST pin)

define TFT_BL 32 // LED back-light

define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)

define TFT_LED 32 // LED back-light

define TOUCH_CS 21

define TOUCH_IRQ 35