Skip to content
Discussion options

You must be logged in to vote

The TFT_eSPI library expects the touch controller and TFT to be on the same SPI bus. The sunton board connects the touch controller to diferent pins:

#define LCD_MOSI 13
#define LCD_MISO 12
#define LCD_SCK 14
#define LCD_CS 15
#define LCD_RST -1
#define LCD_DC 2
#define LCD_BL 21

#define TOUCH_MOSI 32
#define TOUCH_MISO 39
#define TOUCH_SCK 25
#define TOUCH_CS 33
#define TOUCH_IRQ 36

The TFT_eSPI library can still be used but you will need an independant library for the touch functions. There are quite a few libraries that support the XPT2046 touch controller, such as this one:
https://github.com/achillhasler/TFT_eTouch

There are no plans to change the TFT_eSPI library to support differ…

Replies: 7 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Atmannen
Comment options

Answer selected by Atmannen
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@andersondeoliveiramachado
Comment options

Comment options

You must be logged in to vote
2 replies
@Atmannen
Comment options

@MYCAMEL222
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants
Converted from issue

This discussion was converted from issue #2670 on May 28, 2023 18:06.