Git Product home page Git Product logo

Comments (6)

davidarroyo1234 avatar davidarroyo1234 commented on June 20, 2024 1

Okay, thank you so much.

I will try this in the afternoon.

from esp-idf-parallel-tft.

nopnop2002 avatar nopnop2002 commented on June 20, 2024

The 4-line resistor touch screen uses 4 pins.

  • X(+):Digital Output
  • X(-):Digital Output/Analog Input
  • Y(+):Digital Output/Analog Input
  • Y(-):Digital Output

ESP-IDF cannot provide both digital output and analog input at the same time using a single gpio.
Two GPIOs are required to perform digital output and analog input.
(X-) and ESP32 are connected by two wires.
(Y+) and ESP32 are connected by two wires.

(X-) ----+---- Gpio for Digital Output
         +---- Gpio for Analog Input

(Y+) ----+---- Gpio for Digital Output
         +---- Gpio for Analog Input

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.

ADC-CANNEL

from esp-idf-parallel-tft.

davidarroyo1234 avatar davidarroyo1234 commented on June 20, 2024

Oh so from the same lcd pin i have to connect to 2 esp32 pins? 1 for the input and 1 for the output?

from esp-idf-parallel-tft.

nopnop2002 avatar nopnop2002 commented on June 20, 2024

Yes
You're right.

from the same lcd pin you have to connect to 2 esp32 pins

(X-) ----+---- Gpio for Digital Output
         +---- Gpio for Analog Input

(Y+) ----+---- Gpio for Digital Output
         +---- Gpio for Analog Input

from esp-idf-parallel-tft.

nopnop2002 avatar nopnop2002 commented on June 20, 2024

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.

from esp-idf-parallel-tft.

davidarroyo1234 avatar davidarroyo1234 commented on June 20, 2024

Thank you :), now it's working.

Im closing the issue.

from esp-idf-parallel-tft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.