witnessmenow / ESP32-Cheap-Yellow-Display

Building a community around a cheap ESP32 Display with a touch screen
MIT License
1.26k stars 128 forks source link

TOUCH_CS undefined warning in hello world example #213

Open mcl-uk opened 2 weeks ago

mcl-uk commented 2 weeks ago

I'm a complete newbee to CYD - thanks so much for your brilliant intro into using this kit. Trying the Hello World example I was getting TOUCH_CS undefined warnings, and a blank LCD screen. Uncommenting one of the TOUCH_CS lines in User_Setup.h got it working. But I'm unsure what the correct setting for TOUCH_CS should be, your Pin Descriptions page indicates it might be 33, is this right? If so it might be worth updating the User_Setup.h file to include this and avoid confusion for other newbees like me. Thanks again. Steve.

TheNitek commented 2 weeks ago

The touch screen is not sharing a bus with the display (see https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/PINS.md#touch-screen ), which is not supported by the TFT_eSPI library. The warning is nothing to worry about. For details on how to setup the thouch screen you can have a look at the other examples.

mcl-uk commented 2 weeks ago

My point was that (somehow) the display would not work until TOUCH_CS was defined.

TheNitek commented 2 weeks ago

There should be no correlation between that warning an the screen working (/not working)

mcl-uk commented 2 weeks ago

Quite! But that was what happened.

Zynth9999 commented 2 weeks ago

Hey! I had a similar problem, are you using PIO or Arduino IDE?

mcl-uk commented 2 weeks ago

I'm using arduino IDE.

Zynth9999 commented 2 weeks ago

Ah then start using PIO, it worked for me and it's overall better.