Help Wemos D1 R32 with 3.5" TFT LCD Touchscreen Shield

I use Wemos D1 R32 with 3.5" TFT LCD Touchscreen Shield

The problem is on the touchscreen code...

I already wiring my wemos like this

But it still can't get the touchscreen...

I using mcufriend_kbv library and my TFT shield like this

Please help

Hi @vgomasjaya

Are you sure your display has a touch layer? I don't see any pins for touch.
A link to where you bought it may make that clear.

There are capacitive touch layers with a touch controller, and there are resistive touch layers with or without touch controller.
Resistive touch layers without controllers exist as shields for UNO, but most likely don't work with ESP32, because of not enough analog pins. But I am not expert for this.

Jean-Marc

it's Indonesian e-commerce

the description is
LCD Type : TFT
Resolusi : 480 x 320 pixel
LCD Size : 3.5inch diagonal
Board Size : 56 x 85mm
Interface : Bus 8bit serial
Driver : ILI9486
ID : 0x9486
Touch : YES Resitive
Support Arduino Uno dan Mega

I have tried on Arduino Leonardo, and it works... but I want to use this on Wemos D1 R32

Thank you for the link. Yes, it has resistive touch, you can see the 4 flat connections of the touch layer. Most likely it has no touch controller, but the touch layer shares pins with the TFT data lines.
As far as I know, MCUFRIEND_kbv can handle this configuration for UNO (and MEGA). But I doubt that it could work on ESP32.

I have a nearly identical display (ok, it is identical, except for black instead yellow pins).
I intend to experiment with MCUFRIEND_kbv with this, but had no time yet.
You can measure resistance between data pins, but I need to find out which pins, by looking at the library source. My display has a ILI9487 controller, as my first test revealed.

BTW: the modification you show has also been reported by @bodmer for TFT_eSPI, but again, I don't know the details.

If the display board is fitted with a resistance based touch screen then this can be used by performing the modifications described here and the fork of the Adafruit library: GitHub - s60sc/Adafruit_TouchScreen: Arduino library for 4-wire resistive touchscreens

See 8 bit parallel support in https://github.com/Bodmer/TFT_eSPI/blob/master/README.md

You should be able to use touch with TFT_eSPI and the Adafruit_TouchScreen.

yes I already follow the s60sc, but I dont know the define pin for XP, XM, YP, and YM... I've tried to run ESP32testTouch

and still now working, I think there's a problem at the define pin for XP, XM, YP, and YM

I can't use TFT_eSPI, because I already tried the User_Select and no one can work with me... but MCUFRIEND_kbv works even without any mod

This is an example setup file with the correct GPIO for this UNO board.

Doesn't work for you?

Strange, because of:

Unfortunately the typical UNO/mcufriend TFT display board maps LCD_RD, LCD_CS and LCD_RST signals to the ESP32 analogue pins 35, 34 and 36 which are input only. To solve this I linked in the 3 spare pins IO15, IO33 and IO32 by adding wires to the bottom of the board as follows:

yes, I already uncomment Setup14, and I still got white screen... So I tried MCUFRIEND_kbv and it works...

yeah it's so frustrating.... I already wired it and still not working....

And I have a weird board, I find my IO35 printed as IO36 (so I have two IO36 printed), so I don't know it's a miss printed or anything else

#define ILI9341_DRIVER

Setup14 is for a different controller. But for your pinout.

what do you mean? I uncomment setup14 and add #define ILI9341_DRIVER in my code?

#define ILI9486_DRIVER instead. Maybe.

or check if there is a setup for ILI9486 with the same pin mapping.

nothing works

Edit:
I use MCUFRIEND_kbv and run TouchScreen_Calibr_native, where

int XP = 27, YP = 4, XM = 15, YM = 14; //most common configuration

and it works but with some problem, I only just a little of the screen (arround 1/4 of screen => buttom right)...

and the result of calibration is

const int XP=27,XM=15,YP=4,YM=14; //320x480 ID=0x9486
const int TS_LEFT=0,TS_RT=0,TS_TOP=815,TS_BOT=705;

PORTRAIT  CALIBRATION     320 x 480
x = map(p.x, LEFT=0, RT=0, 0, 320)
y = map(p.y, TOP=815, BOT=705, 0, 480)

LANDSCAPE CALIBRATION     480 x 320
x = map(p.y, LEFT=815, RT=705, 0, 480)
y = map(p.x, TOP=0, BOT=0, 0, 320)

do you know the solution?

Edit:
when I use wifi, I can't touch anything now

Edit:
without wifi, I run TouchScreen_Calibr_native and print tp.x tp.y dan tp.z... tp.y and tp.z work normally but tp.x always 0

I use
int XP = 12, YP = 4, XM = 15, YM = 13;

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.