-
Notifications
You must be signed in to change notification settings - Fork 14
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
2.8" TFT (8bit) touch screen feature not working #33
Comments
https://www.elegoo.com/products/elegoo-2-8-inches-tft-touch-screen Looking at this picture, it looks like there are no pins for the touch screen. There is no Chip Select to enable the touch screen. |
If you scroll down on that page, it does display a pinout picture, describing what each pin does. The Arduino code I have from the CD, is using 2 analog pins, and two digital pins to drive the touch screen. I'm new to all this, 8bit parallel pins, and what gets sent where, etc. I don't even know where to start learning it, to be honest. Right now I'm trying to mount this TFT touch screen to my homemade thermostat. |
Interesting. The board I use does not have an SPI interface, and I thought the library and pin setup accounts for that, whjich it did to a degree, and it allowed me to get my screen to display something, apart from the touch screen. ./xpt doesn't work either, and I assume from your comment that it may be because of the SPI missing interface, or the "PEN" pin. Do you know if the touch screens generally only work on the SPI interface, or is it a hardware implementation depending on the model/brand/company that produces them? (I always assumed that these will use common interfaces: i.e. i2c, spi, usb, etc) Thanks for your help! I'll try to see if I missed something else. |
I want to know how the Arduino code controls the touch sensor. If you have the arduino code in your repository, I can see it. |
Give me few minutes to upload it somewhere. |
have a read here: https://github.com/ciobania/el-sm-04-tft-touch-screen-docs |
I saw the Arduino code. If you want to use the touch sensor with Pi, you need a TFT with xpt2046. |
Can you point me to one such display, or provide some names/brands? Thank you |
I searched for it, and couldn't find it. One thing I was considering was to get an analogue to digital sensor for raspberry, however I wonder if its possible to use/configure the arduino code from the docs I shared. The idea is that the analog pins are used in order to have the posibility to use the other pins for something else, and not because the display is providing the data through analog. Maybe I'm wrong but thats what I understood from the docs |
Yes. The pins for the 4-wire resist touch screen are shared with the LCD control pins. Analog pins are used not only because the display provides data via analog, but also to control the LCD. |
I'll keep digging around, and see if I can get anywhere this week with any of the two displays. I'm not too familiar with C/C++ so it's harder for me to understand how it all works. Thanks again for your feedback, and help with it! Much appreciated! |
I'm closing this as I was able to use a different screen, with dtoverlays. Unable to use this repository, to drive my version screen, unfortunately. Thank you for your help and feedback! |
Hello,
Firstly, thank you for making this possible and sharing it; I've struggled to gather knowledge on how to make my display work with a Raspberry Pi for long time now.
I was able to run through most of the demo/examples you provided, successfully, apart from the last one with the touch screen.
My issue currently is that I cannot get input from the touch screen. I have compiled the touch binary with the 8BIT parameter, and when I run it, it displays the numbers, but that is pretty much all I can do with it;
I see that in touch.c there is a pin defined for pen input on GPIO 6; I don't understand how that works, or where the input will come from, because my TFT screen does not have a separate pin for the PEN (I have the 8bit parallel version).
Because I have redefined the pins I'm using, I changed the pin in the touch.c file to an "empty" one, like it was initially (or that's how I'm reading it).
Here's my git diff output, to help you understand what I changed:
This is the TFT Screen I am using: elegoo 2.8"TFT Touch Screen
Thank you kindly for your effort and feedback, and for making this possible!
Much appreciated!
Stay safe and healthy,
ciobania
The text was updated successfully, but these errors were encountered: