0

HX8357D display with touch not working with ESP32-Wroom-32 m
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

HX8357D display with touch not working with ESP32-Wroom-32 m

by madhu18 on Thu Dec 26, 2019 9:05 am

hi, I am using Adafruit HX8357D with ESP32-Wroom-32 module. I am able to utilize the display properly but not the touch. Can you recommend any suggestions on my below setup details.

#include <Adafruit_GFX.h> // Core graphics library
#include "Adafruit_HX8357.h" // Hardware-specific library
#include <SdFat.h> // SD card & FAT filesystem library
#include <Adafruit_SPIFlash.h> // SPI / QSPI flash library
#include <Adafruit_ImageReader.h> // Image-reading functions
#include "TouchScreen.h"

#define TFT_CS 4
#define TFT_DC 2
#define SD_CS 5

#define YP 33 // must be an analog pin, use "An" notation!
#define XM 25 // must be an analog pin, use "An" notation!
#define YM 35 // can be a digital pin
#define XP 34 // can be a digital pin
//remaining settings are default

And, am getting some negative x and y coordinates continously when I run the code with the below library run.
TSPoint p = ts.getPoint();
p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
Serial.println(p.z);

Appreciate your inputs.

madhu18
 
Posts: 2
Joined: Thu Dec 26, 2019 3:48 am

Please be positive and constructive with your questions and comments.