-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch input for st7793. open smart 16pin #25
Comments
The 4-line resistor touch screen uses 4 pins.
ESP-IDF cannot provide both digital output and analog input at the same time using a single gpio.
When reading analog with the ESP-IDF ADC, use the channel number instead of the GPIO number. adc_yp is ADC1 channel# for reading Y+ analog value. adc_xm is ADC1 channel# for reading X- analog value. Refer to the ESP32 data sheet for the relationship between ADC channels and GPIOs. The explanation was difficult to understand, so I updated the README. |
Oh so from the same lcd pin i have to connect to 2 esp32 pins? 1 for the input and 1 for the output? |
Yes from the same lcd pin you have to connect to 2 esp32 pins
|
Okay, thank you so much. I will try this in the afternoon. |
These TFTs are designed for the AtMega328 (Arduino UNO). With AtMega328 (Arduno UNO), one GPIO can be used by switching between digital output and analog input at runtime. However, ESP-IDF cannot do this, so two GPIOs are required. |
Thank you :), now it's working. Im closing the issue. |
First of all I wanted to thank you for your work.
I have a question.
I have a open smart 3.5 tft display with this setup.
(Screen pins-> ESP32 pins)
D0 -> 12
D1 -> 13
D2 -> 26
D3 -> 25
D4 -> 17
D5 -> 19
D6 -> 27
D7 -> 14
RD -> 2
WR -> 4
RS -> 15
CS -> 33
RESET -> 32
Which are the correct pins on each parameter for this to work? Especially the parameter adc_yp and adc_xm
![image](https://user-images.githubusercontent.com/29355377/162228364-541a89a4-f588-4b97-a7f8-754eee410604.png)
The text was updated successfully, but these errors were encountered: