bkosciow / gfxlcd

ili9486, ili9325, ssd1306, nju6450, ad7843, xpt2046 @ Python @ Raspbery Pi
MIT License
19 stars 5 forks source link

Installing #19

Closed sokolbiba closed 6 years ago

sokolbiba commented 6 years ago

Hi there, Could you give some advices on how can I use this library with touch screen? I am trying to run it from terminal but it does not work for me. Thank you in advance :)

bkosciow commented 6 years ago

Hello,

Can you describe what kind of problems u have, any error message? What kind of display are you using? Try and see the demos in demo directory, there is a code and code speaks better than words ;)

sokolbiba commented 6 years ago

Hi, I trying to use it with a 3,2 inch TFT LCD with touch screen. The LCD controler is ILI9325 and the touch screen controler is xpt2046. When I try to run setup.py it shows an syntax error(see the image below). If you could provide some step by step guide it will help me a lot. Thank you :) setup py ili9325 py

bkosciow commented 6 years ago

ahh! you are using python2. it works only with v3 python3 ili9325.py should work

sokolbiba commented 6 years ago

Hi, Thank you for your advice. Seems that now the code is running but there is nothing in the display. I double checked the connection and they are as you suggest in the description. Take a look at the LCD I am using. What can you suggest in this sittuation? whatsapp image 2018-04-26 at 20 42 24 1 whatsapp image 2018-04-26 at 20 42 24

bkosciow commented 6 years ago

check if led is connected, I had a similar problem when my wire was broken. no backlight and nothing was seen on lcd. disconnect power and plug it back. next look at the screen and start script. it should change a little bit. if not then there is a bigger problem with connection and wires. I will post my connections when I get back to home

sokolbiba commented 6 years ago

In the pic above I shut it off and then took the photo. When the RPi is powered on the back light is OK. I double checked the connection and the also seems to be exactly as mentioned in your code. I was wondering if there is any other thing that would make it work.

bkosciow commented 6 years ago

sory for the delay I have plug my screen and it worked. from what I see my is slightly different but it shouldn't be the case. what about voltage? it is 3.3 or 5? and does it flicker a little when code is executed ?

sokolbiba commented 6 years ago

I am using 3.3V. It does nothing while the code is excetuting. What about the RPi, does it have to be a specific version?

bkosciow commented 6 years ago

I had time to look at this problem with more care. From what I see this display is SSD1289 based not ILI9325. So it may not work at all :( I have no display with this chip, the only thing you can do is to look at init process and adjust commands

sokolbiba commented 6 years ago

Thank you for your help. Regards

rogerclarkmelbourne commented 5 years ago

Would it be possible to write some documentation on how to install the library and also how to run the demo

I see from this issue that Python3 is needed, and also it looks like spidev and SPI are also needed e.g. pip3 install spidev

I tried to run setup.py e.g. python3 setup.py install

But I still get an error

ImportError: No module named 'RPi'

Which can't seem to resolve, because

pip3 install RPi

didnt work.

But

sudo apt-get install python3-dev python3-rpi.gpio

did seem to work.

However I now can't seem to get PIL installed for Python3

I hoped the running setup.py install would do this :-(

rogerclarkmelbourne commented 5 years ago

FYI. My Waveshare (clone) display is still not working, but in case its any use, this is the list of commands I needed to invoke just so that the demo's seemed to run and not give errors

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
pip3 install Pillow
sudo apt-get install libopenjp2-7
pip3 install SPI
pip3 install spidev
sudo apt-get install python-rpi.gpio python3-rpi.gpio
sudo apt-get install raspi-config
sudo raspi-config
#Enable SPI from interface options

PS. I"m not sure why the Waveshare 3.5 inch LCD screen clone is not working. It tries to work, and the screen flickers a bit and at one time it tried to draw and image, but its not usable.

I think I'll need to try to find out what chipset the LCD display actually uses.

The driver explained in this article seems to work

https://www.willprice.org/2017/09/16/adventures-with-tft-screens-for-raspberry-pi.html

And the chipset is supposed to be the ILI9486 but perhaps some of the control pins are not the same as the Waveshare (though this seems unlikely)

bkosciow commented 5 years ago

Hi, I try and write a quick start guide, thanks for your steps. I have one display that looks like yours and I couldn't get it to work :( For sure there is some communication problem but I switched to ili9486 with spi and forgot about it. If I find the display I try and follow a link you posted, seems like the answer is there ;)