configuring raspberry pi without tft display supplier
Thanks for bringing this to my attention. It appears that the upgrade package overwrites the FBTFT drivers, in particular, the Raspberry Pi bootloader. This seems to solve the problem:
I just tested this, and it looks like the difference is how SPI is enabled. In the RPi 2 it’s enabled in raspi-config, not commented out in the blacklist file. I just updated the post so it should work now!
Looks like the only difference is in how SPI is enabled. In the new release of Raspbian, SPI is enabled in the raspi-config menu under advanced settings. In older versions of Raspbian, it is enabled by commenting out the line in the blacklist file
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_device.name=waveshare32b fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0
Unfortunately, their “driver” is an SD card image containing a complete installation of Raspbian which has been preconfigured to use their display. Which is fine if you’re setting up a brand new system that doesn’t need to be a specific distro, but if you’re trying to add the display to an existing Raspberry Pi, already configured the way you want it, with software installed and data present, or if you want to use a specific distro such as Octopi, then it’s not terribly helpful.
Hello..I tired to interface this lcd “https://www.crazypi.com/raspberry-pi-products/Raspberry-Pi-Accessories/32-TOUCH-DISPLAY-RASPBERRY-PI” to my Raspberry pi model B+.I got a DVD containing image for LCD in the package.I burned it to the SD card and plugged in the display.But my lcd is completly blank.But green inidcation led (ACT LED) in board is blinking.Why my LCD is Blank ?
Thank you for this great tutorial. I looked everywhere for this information. I have an eleduino 3.5 version A. I was able to get it working on my Pi 2 by following your tutorial and using flexfb as the screen type. I got the other settings from the image that came with the product. I did find that the ts_calibrate didn’t recognize the screen so I installed xinput-calibrator and it worked fine.
Just got my Pi2 running Wheezy, working with the Eleduino 3.5 LCD without running the OEMs image… kinda. I didn’t want to rebuild the application environment again, so was avoiding flashing the SD.
Unzipped it and looked around. From a shell script inside i kinda figured out what it was doing. I didn’t like what I saw, so I manually made changes omitting the parts I didn’t like (it rm -r my /lib/modules directory… omitted that part) and copied 2 files and 1 directory from the OEMs archive to the file system of my Pi2.
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa21041 bcm2709.serial=0x631a4eae smsc95xx.macaddr=B8:27:EB:1A:4E:AE bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_device.name=flexfb fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0
i have a watterott display (https://github.com/watterott/RPi-Display) and changed the device-name to “rpi-display”. i use a rsapberrypi 2 and hae the latest raspian image installed.
Did you check to see if your device is supported yet? The device name should be specific for your screen, as listed in the fbtft file linked to in the beginning of the post
I too have a raspberry pi 2, and a waveshare spotpear 3.2 RPi lcd (v3) and I just can’t get it to work! I suspect I have a faulty LCD, but thought I’ll try this forum for help before I sent it back.
Soon as the pi is powered, the LCD lights up all white, with a few vertical pixels coloured at one of the edges, and nothing else. I don’t think that should happen – not at least before the BOIS has started up.
Anyway, point 1, says to change to dev/fb1 – I don’t have fb1. Only fb0 appears to be there. is that a clue what could be wrong? I have enabled SPI (is there a command to tell if its enabled?) I have also ran spidev to troubleshot (though I haven’t a clue what I means)
Any ideas what going wrong? I am using the latest “2015-02-16-raspbian-wheezy_zip”. Enabled SPI. done all the steps. Even changed mmcblk0p2 to mmcblk0p6 as suggested by Dabomber60 (but that freezes for me)
[ 0.000000] Linux version 3.18.5-v7+ (pi@raspi2) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 – Linaro GCC 2013.11) ) #1 SMP PREEMPT Fri Feb 6 23:06:57 CET 2015
It seems all appears to be working – just the LCD is still all white with a single line of coloured pixels on edge) and nothing else. Is there a way to output, like jeff G script, of touch points?
I had the same one, I finally found a driver for it here: http://www.waveshare.net/wiki/3.2inch_RPi_LCD_(B) you will need to translate the page, but unpack the driver then run sudo ./LCD-show/LCD32-show. It should reboot and all will be good with the screen :)
Can anyone let me know if the default OS image sent with the screen works with pi2 or just Pi B/B+ as i think my screen maybe broken but can’t confirm it yet as i have not had it working at all
My system: Raspberry Pi 2 Model B with Raspian Wheezy from Febuary 2015. LCD display of Sainsmart 3.2 http://www.conrad.de/ce/de/product/1283498/Raspberry-Pi-Display-Modul-Touch-Display-81-cm-32/?ref=home&rt=home&rb=1
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup_enable=memory elevator=deadline rootwait fbtft_device.custom fbtft_device.name=sainsmart32_spi fbtft_device.gpios=dc:24,reset:25 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=90
sainsmart32_spi width=320 height=240 buswidth=8 init=-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0XC1,0X30,-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0X12,0X81,-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,-1,0×36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,-1,0xF2,0x00,-1,0×26,0x01,-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,-1,0XE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0×11,-2,120,-1,0×29,-1,0x2c,-3
ads7846_device model=7846 cs=1 gpio_pendown=23 speed=2000000 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=300 x_max=3800 y_min=700 y_max=3400
The LCD display shows the raspberry correctly. However, the touch screen input does not work. The mouse pointer can I move correctly with your finger, but I can not select things (function of the left mouse button).
Thank you so much for this great tutorial. I have my WaveShare SpotPear 3.2″ V4 working fine on my Raspberry Pi 2. If you are having problems with this specific hardware, skip step 5.
Can someone upload SD card image that works with RBP2 ? My idea is to use Eleduino TFT as additional screen and play movies via HDMI.. is it possible?
Do not follow this article when you don’t know what kind of LCD module. In my case, I follow all of this and my raspberry pi cannot boot anymore. I will try to recover, but I think I should format my SD card and reinstall OS.
Also can you someone explain what exactly happen when do rpi-update? Want to understand what this step actualy doing and help me to debug any such situation and able to help others.
Does anyone tried splash boot screen with waveshare v4 LCD and Rpi2? I tried to follow some example from https://github.com/notro/fbtft/wiki/Bootsplash but no success.
in the video you say to change the existing line to “snd-bcm2836” for the rasppi2 which isn’t listed in the written part of the instructions (part 4).. this should be added (I believe it caused me to have to re-image the OS again, the Pi wouldn’t boot to anything just using the written steps)
fbtft_device name=waveshare32b gpios=dc:22,reset:27 speed=48000000 width=320 height=240 buswidth=8 init=-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0XC1,0X30,-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0X12,0X81,-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,-1,0×36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,-1,0xF2,0x00,-1,0×26,0x01,-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,-1,0XE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0×11,-2,120,-1,0×29,-1,0x2c,-3
ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
After following this tut to the letter on a brand new image of Raspian, I find that the touch driver does not function. Anyone experience the same? Basically all I did was image a current copy of rasping, did a apt-get upgrade, and then did this tutorial. Then the touch driver does not work, meaning the pointer does not respond.
The reason I did this was because on a production version of my system I added the 3.2 screen and it worked great except for the x-axis. So I wanted to see if there was something in my system that was interfering or if this is another error. Now with a raw rasping the driver does not work at all. I wonder if the touch pin has changed since the kernel is using BCM pins instead of GPIO pin numbers?
I remember that I plugged in the screen wrongly one time, before configuring any of the GPIO pins. Can this have damaged the screen? Still it’s weird that the display part works well and the touch part not at all.
I do not think that has anything to do with it. Other than power pins, the rest are communication. If it still works then you are good. No, there is something else. I do suspect it us related to the BCM pin numbering. The real question is… Why isnt the eeveloper responding? I have since abandoned this TFT because of his lack of response.
Touch actually goes through one of the SPI pins I think. Either the driver is toast with the required kernel update or the driver is using the wrong pin. It is very likely the this works well with previous raspian versions, but not with the new B+ and with the new kernel.
I am trying to use the sainsmart 2.8″ lcd sold through microcenter, using the sainsmart32_spi … seems to have the same pinouts, should I be able to get this to work? I am stuck at the white out screen on the lcd, doesn’t seem to recognize the module either.
Unfortunately I’ve tried that ( a few times actually) but the file still doesn’t exist. Thanks very much for the assistance anyway. I must be doing something wrong. My Raspian came from a Noobs installation, I’m wondering if I should try installing the OS from somewhere else. My LCD screen didn’t come with a CD or any docs so I’m completely in the dark here.
I have just found a way to get this file on my system! Apparently its part of the fbturbo installation. I found it here http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=45746&start=75 (under experimental enhanced x driver (rpifb).. Sorry if this is obvious to everyone but I am SUCH a noob at this!!
Ok, what am I doing wrong. I am using a fresh install of the newest raspbian, on a Pi 2. After doing the first two steps and rebooting I get the rainbow screen, then the boot up process, and then my screen just goes black with a flashing cursor in the top left. I am not able to enter any commands or anything…like the pi is halting just after boot up. Any thoughts/suggestions would be greatly appreciated. Thanks.
Well figured out that step 1 was causing my problems. I’m guessing it is shutting off my hdmi feed and trying to switch it over to the SPI, am I guessing right? If so, not sure how I’m suppose to complete the rest of the steps if my hdmi output gets turned off before the LCD is actually set up to work…that sounds kind of smartass-like, which is not my intention, just looking for some clarification on what is going on in that first step as I am fairly new to this stuff. Thanks.
Here is a link to an updated image from waveshare. Upon install it got the display up and running, but I still do not have touch functionality. I’ve been playing around with it, but it has been to no avail…hopefully someone better at this stuff from me can get the touch working.
I am having an issue with getting the GUI back. Every time I use startx my pi just sits there for about two minutes saying “No protocol specified”, and then it just gives up. I went through this tutorial about four times now and am not certain why it is doing this. I have the exact same LCD as is in the tutotial (WaveShare 3.2b). any help would be great.
Hi I am making a project for school,using the raspberry pi b+ and waveshare spotpare 3.2b. Everything works except the touch input doesn’t work. Any help would be appreciated very much.
I am trying to get this same screen to work with the image of RetroPie 2.6 and it won’t work. I have followed all the steps and nothing, please help I an kinda a noob.
I have a Tontec 7 inch touchscreen with a Raspberry Pi 2 B. After following the instructions the touch screen is functioning but not properly… The only are that works is the upper left (and only a small area of that). I tried changing the width and height in the modules but it didnt change anything. Also the xy seems to be reversed, I changed the swap_xy to 1 but again no change on the screen.
hi i have the same screen with a raspberry pi 2 im trying to run retro pie but it wont show ..however it shows all the commands …but i cant get it to show the gui …if u guys can make an image or something please i have been in this pain for two weeks already thank you
well ,,i follow all instructions and still kernel panic ,,,,may i request from mr. Circuitbasics@Gmail.Com that have a contact with manufacture and just ask for 2-3 links for image files for different versions of pi till all this f discussions are finished,,i cant understand 10 guys said we run it and 40 guys said kernel panic ,,as an expert i did 50 times imaging and follow all changes fro this forum and other forums and still cant run it ,,,so sth is wrong …..just asking the manufacture for simple f image ,,that`s it ,,,,simpleeeeeeeeeeeeeeeee
well i did it at last on pi 2,,after reading 100 pages and reimaging 50 times ,,i finally find the solution ,,,,there is a simple line forgotten to be attached in setup instruction,,,well i give u clue for prodigies ,,there is a step left between step 3 and 4,,,,and a simple change in step 5 according to your pi version ,,,that`s it ,,nothing else,,,,
Damn.. I thought I was kickin ass haha. I am using the SainSmart 3.2″.. the backlight is lit up and the pi was booting and everything just fine but on the final reboot it gets hung and says “nonblocking pool is initialized” ?? No idea what that means. But it’s def just frozen at this point.. on my main screen, and just the backlight is on the SainSmart.
This was an excellent tutorial. I have gotten an output to the screen, but no touchscreen usage . I have the Waveshare SpotPear 3.2 Inch LCD V4 screen, but using Raspberry PI 2 with wheezy. Any ideas?
Thanks a lot for this article. Very clear and easy . I am new in pi’s world and my 3.2″ screen is working fine. I rotate 90 º and works. I can use mouse and so on.Not problems.
I filed the steps to calibrate the screen but it did not work.I think because it did not find the TFT pin, because I think the touch problem is the assigned pin to control it changed.
I actually used the driver from here http://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B) , from a new wheezy build, did nothing except enable SPI in config, install driver, and change mmcblk0p2 to mmcblk0p6 in cmdline.txt and it all worked, no drama.
Hi I managed to set up my touch screen ok but I now have the issue that everything desktop fits fine but the windows I open are all huge and I can’t remember how to change the size and cannot see the option in desktop preferences any idea what I have to do and is it at all possible to install kodi to run through the raspbian is as this would be a lot my useful than having to keep swapping os on every boot up many thanks in advanced hope you can help me
Advice to all who have the drivers from the (touch)screen manufacturer and cannot obtain those otherwise: you can skip everything and go to the update steps skipping the kernel and kernel modules update (as mentioned by the author) so that you don’t override the preinstalled drivers. I have a Waveshare 3.5″ RPi v3 (not the 3.2″ supported by notro’s drivers) and actually managed without any problems to get notro’s drivers make it work. However I am still reading about the xinput and xinput-calibrator to figure out how to include it as a kernel module so that I can compile my own kernel and add it there.
i have raspberry pi 2 with 3.2 inch rpi lcd v4 waveshare spotpear.i have done as per your instructions.the display is working but touch screen not working.error shows waveshare32b module not found as well as touch screen module not found messages.
Hey! i did this and rotated it… It loads console perfectly, but when it goes into startx, i get a black background with only the wastebin/trashcan… how do i get the taskbar(or whatever that bar is called)? and the raspberry background?
Unfortunately I have lost the Touch facility on my Waveshare 3.5″ LCD Touchscreen? Can you offer any reasons as to why? I copied the Raspbian image to my Raspberry Pi from the Waveshare website first of all. The Touchscreen displays but is not reactive with any touch
I have purchased a raspberry pi B+ total kit and waveshare 3.2 TFT display online. In the package i have been given a pre-loaded NOOBS installed SD card. I did not even start anything yet. What should i do what r the things needed and how to connect the display i really want to know. I need help as i don’t know anything. Does the above solution help or will u suggest something………………..
Hi great article thanks. I am trying to get a waveshare 7 inch LCD with capacitive touch running it works with the suppled image but if you upgrade it breaks the capacitive touch. I have a sense-hat and GPS which require the latest kernel and RASPIAN image and the install program for the screen replaces the /lib/modules directory and the kernel with older ones. I need to be able to install the touch drivers into a new clean OS can anyone give me some pointers? Thanks
For anyone who have those unbranded cheap TFT touch modules and cannot get it to work with this guide, I had success on my 3.5″ with the following steps: http://pastebin.com/89qmFbPB
I have the WaveShare 3.5 (A) and cannot get it to work with the Kali Linux with TFT for Raspberry Pi. Have anybody gotten the A to work? (Not the B, theres instructions for the B already and dont work with A)
So I have the original image that came with my screen and it works fine with the LCD but my problem is that I want to use my LCD screen with other distros (at this time I am trying to use it with Kali Linux with TFT support by default https://www.offensive-security.com/kali-linux-vmware-arm-image-download/) What do I have to do to transfer the needed files from the original image that WORKS with the screen and use them with another image?
I originally bought this bundle http://www.amazon.com/gp/product/B013E0IJUK?psc=1&redirect=true&ref_=oh_aui_detailpage_o02_s00 with an RPi LCD V3 and no extra documentation on the specifics on the chipset. I tried with the bftft drivers but since I have no idea what to call this screen I just suppose it isn’t supported.
I’m not sure if the Jessie kernel is compatible – can anyone please confirm or not ?? Adafruit states that their setup for TFT screens are Wheezy only ; is this a different setup ??
Oct 16 17:38:48 spare kernel: [ 12.544859] graphics fb1: fb_ili9340 frame buffer, 320×240, 150 KiB video memory, 4 KiB DMA buffer memory, fps=50, spi0.0 at 48 MHz
After I rebooted in step 3, my raspberry pi won’t boot up again. It goes thru the process of booting and the text scrolls down and every thing says “ok”. Then instead of going to GUI it just guys to a black screen on my monitor with a blinking underscore in the top left corner. Anyway to get around this? or should I start over with a fresh disk image??
That is what happens to mine also.. So long story short —> THIS SITE NEEDS TO BE UPDATED OR SHUT DOWN <— There are a hundred people on here that have all lost everything on the pi drive, and spent all day (or more) working thru this tutorial 4 or 5 (dozen) times and nothing. Just have to reinstall the os over again and again.
Please check out my answer, it may help you if it works. I’m not in that case but I’m assuming that the desktop environment simply doesn’t automatically start running anymore… This can be changed in the raspi-setup
Try typing ‘startx’ if you problem isn’t solved (assuming you’re using Raspbian and LXDE), it should start the desktop environment you’re used to see. What you’re seeing is the Command Line Input interface (CLI), the most basic way to interact with a computer. Hope I helped you a little
I have tried to set up waveshare 32b on my Pi B using the latest Raspian download. I learned a lot in the process using Windows Putty, Nano etc. I have repeated the setup process several times from scratch and included the corrections for possible overwriting. My Waveshare SpotPear 3.2 inch RPi LCD V4 just shows a white screen. Any suggestions?
There was no disk included. I asked for drivers and was given a download link to the image file. After down loading this I tried it and still got just a white screen. The HDMI monitor locks partway though the boot. I can still log in to pi using putty from my PC.
Hi, I am using raspberry pi 2 with raspbian jessie installed. I the waveshare spotpear 3.2 v4. The above instructions are not working. and after completing the steps there was no display from hdmi or lcd. One things to notify is.: the etc/modules files only had i2c-dev and not snd-bcm2835.
I am trying to get this to work with Retro Pie 3.3.1 and the Waveshare3.2″ v4 but I only get the terminal on the lcd and emulation station starts on hdmi. to get it working with retro pie i just replaced startx with emulationstation. how do i get this to work?
Sir, Your post has very useful to me. i am using Tinylcd. but i cant get display. i am performing all the steps in your post. i cant get touch controller information from the product website and also i am using RASPberryPi B+ model. could u please give me best solution to my work. Than you.
what if OS is not Raspbian, any other distro like Yocto project, etc.? Could you please specify process without “rpi-update” that makes driver installation process more generic, not dedicated to Raspbian.
I completed all steps except for the last one (I want it to boot to console). However, when I reboot, it never completes the boot process. I start in recovery mode and check the cmdline.txt file and it is exactly how it appears on this page. I copied the kernel info as well, but I am not sure if it correct as I cannot get to it to check. Any suggestions? I might just reinstall the OS and start over…
i installed android OS in raspberry pi 2. can i use same LCD touch screen set up for android installed raspberry pi 2 which you are used for raspbian.
I have KeDei 3.5 inch TFT version 4.0 by Osoyoo. (released after January 1 2016) how do i get it working with vanilla Raspbian Jessie (do not want to install the image sent by the seller)
I’m trying to use an original Raspberry Pi model B with a cheap 3.5 inch 320×480 LCD which allegedly was manufactured to work with the Pi and has the correct fittings to fit over the GPIO pins. The operating system is the latest, downloaded yesterday and installed with NOOBS. I can’t get past step 2 of this guidance. When I reboot after using raspi-config I can see text generated as the Pi boots, then the HDMI fed screen goes blank apart from a flashing cursor in the top left hand corner. The LCD just remains white with nothing else on it. I have missed out step 1 and rebooted after step 2 and the screen functions as I would expect. Does anyone have any ideas please?
Thanks for the great tutorial. I do have a question. Once you install the drivers for the lcd are you effectively disabiling the hdmi port or is it still available to use and will the pi function with both displays. I have a pi 3
Thanks for the guide, have been doing this with my son but once we leave raspi config and reboot all we get is a black screen with a flashing white horizontal line (dash). Can you help? I have looked in the comments at the end of the article but no one else appears to have this issue.
I have a raspberry pi 2 with waveshare screenn 3.5 inches. Isn’t it the same instructions. But it isnt working, all i get is a white screen, and the red led on the pi is on. The green LED isnot working.
i am sorry, but i am a naive , and i have this question, can we upload any file into it for the display? like have a software in which if i tap it gives back a feedback to the code?
My Rpi3 gets “ERROR: could not insert ‘spi_bcm2708’: No such device” after I enable SPI in the raspi-config.My Rpi3 is freezing on the rainbow screen after I reboot at the end of step 3. I’ve tried adding boot_delay=1 to config.txt.
if any interested, now i have a raspian image working on raspberry 3 with Waveshare 3.5, also with sdr support for dongles and FreqShow working perfectly on touch
ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
No matter what I do, I can’t get this to work. It works perfectly fine on my Pi2, but when I follow and use the guide on my Zero, I always end up with the activity LED blinking 8 times (corrupt SD/filesystem error).
I’d like to find the driver software for my 7″ LCD with touch (official Pi unit) so that I can use it in buildroot. I wanted to make sure this kernel is the one before I started digging further.
I started through your tutorial and completed step 3 and rebooted. After the Raspberry screen and some of the boot text on my HDMI monitor, I now have a black HDMI monitor and a white screen on my LCD. Does this mean that the bootloader was overwritten or something else is wrong? How am I supposed to enter in the proposed fixes to the bootloader, when I can’t get the RPi to boot? Do I have to interrupt the boot process at some point to reinstall the bootloader or what?
Its a script. Download and instead of running sudo ./LCD4-show run cat ./LCD4-show to simply display what it does without actually running it. The commands are fairly simple modifying a few files. I actually saved the LCD-show.tar.gz on my own server for faster future download but also for backup as it saved me tons of hours (if that’s a measuring unit for time :) )
I’m using RasPi Zero with latest (as of last week) Jessie Raspbian. Did you run the script? If it didn’t work and you have modified other files in the process of making it work, I would recommend installing a fresh installed image on a new card and running the script. Can you suspect the screen being faulty or got “burned” in the process?
i bought a 3.5 inch tft lcd screen from banggood. and i have installed raspian jessie, the latest version, in my sd card. but when i power on my Pi, only a white backlit screen comes. there are no images or graphics whatsoever.
The owner of this article should including a WARNING in the header that if someone follows the steps, they will install a deprecated driver (which is only visible as tiny text on its gethub page here https://github.com/notro/rpi-firmware). This driver after install will break Raspberry Pi and the SD card will need to be reimaged, for some less experienced users, this could also mean lost work if they failed to backup their code or resources. On windows, it requires installing Linux reader software and it takes a long time to fix this f**kup which could easily have been avoided if the author had and sense of responsibility.
PLEASE DELETE this article. You have great power with this article showing up for so many people in their search results, and you display ZERO responsibility. This is terrible!
I have done every thing right but the only major problem is that the screen is still white and my raspberrypi freezes after a line of code when booting up and I cant get in with SSH
Will your system work with my SainSmart 2.8″ 2.8 inch TFT LCD 240×320 Arduino DUE MEGA2560 R3 Raspberry Pi ? I would like to know before not be able to back out. Thanks, Lee
I know I will end up regretting this, but how do I change fb0 to fb1? I’m on the screen that has all the info, but no way to change it. Am I looking for a file? I have had my screen for MONTHS and I can’t do anything with my pi or the screen. I am >< close to smashing both. COMPLETE WASTE OF MONEY so far!!
hello. I really appreciate your blog post. I have a raspberry pi 3 B. I have been unable to get my waveshare 3.2 screen to work.I am at a complete loss for what to do. I do step 2 I change fb0 to fb1 and then follow your directions I don’t get the prompt to reboot; however, I do it manually with sudo reboot. that works fine then I complete step three and that works just fine; however once I reboot from getting those drivers and when I attempt to reboot it is unsuccessful and then my whole raspberry pi will not restart. then when I power it back on it will just shut back off. I then have to redo noobs onto a new SD card I would GREATLY appreciate anyones help
I ‘m actually using a LCD Waveshare3.2” , I followed your steps to setup the lcd touchscreen for my rpi and it work but I have a problem with the resolution because if I open a repertory I do not see the whole contents on the screen .
hi! thank you for this post…. I was wondering if all the raspberry pi’s gpio are being held by this screen or do we have any of those availables for use??
it worked. but the resolution is for bigger screens. i got the menubar small, but the rest appears too big , and out of screen. the wastebasket icon is 1/6 of my 3.2″ screen. wich HAS the resolution capability too display the whole desktop. But i’m a PI newby and dunno how to adjust the screen resolution on this display. anybody?
I did a 5inch LCD for my raspberry pi. I dont use the touchscreen so i didnt have to install any drivers. It works out of the box but doesnt cover the whole screen unless you open the terminal and do:
HI I have my RPI running Pi Presents on a view sonic TD2230 Touchscreen. It all works fine, touching the click areas can navigate you thru my presentation, The problem arises when you use multitouch gestures like you would on a iPhone. Pinch or expand etc… and then all touch ability goes away. I can still control the presentation via a mouse, but I don’t get touch control back until I either relaunch Pi Presents, or if I unplug and plug the usb cable going to the touchscreen.
Much of this is outdated on Raspbian Stretch where device tree overlays (see https://www.raspberrypi.org/documentation/configuration/device-tree.md) provide for most of the configuration automatically.
After I did the step that “INSTALL THE FBTFT DRIVERS” and then reboot, my raspberry pi couldn’t boot successfully and the green light is always on, could you help me solve this problem? Thank you.
Purplewave India Pvt Ltd. is an AV equipment manufacturing Company. We offer a range of high-quality products such as Active LED displays, video wall displays, digital kiosks, speaker phones, conference video cameras, interactive displays, and much more!
I am running the latest version of Raspbian and i have just reinstalled the SD card and updated it, because i was full on stuff and i wanted to reset my config.txt file. I have tried to run the PI with nothing, but the TFT display attached to it, but that didn"t work. My connections are right, unless you need to attach the video input to ground (which i don"t think so, but i don"t know). If it doesnt send the video in the start is there a way to just force it in the display or try to connect the display to the GPIO"s ?( but not TX or RX, because i"m using them for a project). My display does not start if the display signal is not given to it and maybe the RPI doesn"t detect the screen because its off in the beginning and thats why it doesn"t send the signal to it, because it thinks there is nothing attached to it, so i"d like to find a way to just send the signal no matter what happens if i can.
Depending on your display stand, you might find that the LCD display defaults to being upside-down. You can fix this by rotating it with /boot/config.txt.
If some windows in X are cut off at the side/bottom of the screen, this is unfortunately a side-effect of developers assuming a minimum screen resolution of 1024x768 pixels.
You may need to increase the amount of memory allocated to the GPU to 128MB if the videos are 1080P. Adjust the gpu_mem value in config.txt for this. The Raspberry Pi headline figures are 1080P30 decode, so if you are using two 1080P clips it may not play correctly depending on the complexity of the videos.
I"ve been using the Sainsmart 3.2" and 3.5" TFT LCD (http://www.sainsmart.com/sainsmart-3-5-inch-tft-lcd-320-480-touch-screen-display-for-raspberry-pi-2-b-b.html) with my Raspberry Pi 2"s. I recently bought the Pi 3 and can"t seem to get the screen working.
It seems to fail at the point I download notro"s drivers from github (they download successfully, but on reboot, all I see on the hdmi display is the colored test square, and the SPI display is still backlight white with no image). It fails on this step even if I mix up the order.
However, this is no longer required as newer versions of Raspbian provide it by default. This information has been compiled from that provided here and here.
There is a specific way in which the display must be connected to the pi. This detail is provided in the rpi-display overlay in the /boot/overlays folder.
In the rpi-display@0 section you will see details of pin numbers. The numbers provided here are in hex format. You will need to convert them to decimal.
For example, the RESET pin is labelled to connect to number 17 in hex, which is 23 in decimal. This 23 corresponds to BCM / GPIO 23. Which is pin 16 counted from the top left, row-wise. You can use the following command to convert to decimal from the command line.
The first part maps the boot console to frame buffer 1. Then we change the font to a small size and remove the raspberries that appear on the top left of the screen while booting. Reboot and you should see the console appear on your screen. If you have an external HDMI screen plugged in while doing this, you will notice that the boot messages appear on the TFT. The HDMI display goes to the splash screen and desktop after booting.
This application note is part 1 of our 2 part TFT LCD screen series. Part 1 discusses configuring the screen resolution of a TFT with a Raspberry Pi. Part 2 discusses calibrating the touch screen of a TFT. Click here to read part 2.
This application note discusses how to setup a TFT touch screen display with Raspberry Pi. The display chosen for this project is a 7-inch LCD with a capacitive touch feature. The display has 1024x600 pixels of resolution and when calibrated for the Raspberry Pi can display 16.7M colors. With a few changes to the Raspberry Pi configuration files the dimensions of this display can be matched for perfect resolution.
The display in this project is easy to interface with the Raspberry Pi because it has an LVDS to HDMI backpack adapter connected. This makes it simple to connect an HDMI cable between the two devices and begin your project. In a few steps any display can be configured for optimal resolution. Additionally, this display has a capacitive touch screen which can be calibrated through Raspberry Pi for accuracy. These features combined with the large size of the display make it a great choice for a variety of Raspberry Pi projects.
Connecting the TFT to the Raspberry Pi is simple and only requires a few steps. The display has a HDMI connection backpack interfaced with the device so there is no need for soldering or individual pin connections. If you have used Raspberry Pi before, you will notice that the connection to the TFT is standard and straightforward. Before powering the Raspberry Pi you should make all the necessary connections to the screen. Plug in the HDMI. Connect the CTP port with a micro-USB cable. Power the screen with micro-USB cable connected to a USB port on the Raspberry Pi or a power adapter that provides 5V. You only need three connections to the HDMI backpack module on the TFT.
You will need a mouse and keyboard to setup the Raspberry Pi before the touch screen is enabled. You will also need a micro SD card with Noobs loaded onto it before powering. (Installing NOOBS) Lastly you will need an ethernet cable to setup internet to download or update the software. Once you power the Raspberry Pi, Noobs will give you some options of what software platform you want to install. For this project I chose Raspbian (recommended option). (Installing Raspbian) After installation you will likely notice that the graphics are distorted or that the width and height of the screen are not the desired dimensions. This is because Raspberry Pi’s auto-calibrate feature doesn’t recognize this display. So, to get the best picture, we will need to calibrate it manually.
If it’s not terrible, and you can still see what you’re doing on the display, you can do this through Terminal. We want to edit the “config.txt” which loads from the boot file. The other option is to remove the SD card and load the file on the computer or setup SSH and edit the file remotely.
The file will open in a text editor called nano. We need to add the specifics of our display to the file by adding the following commands to the file:
The last three fields of hdmi_cvt can be omitted, and they will refer to the default values. The other commands declare the use of HDMI and create a new mode for the hdmi_cvt specifications. For detailed information on these commands and others that function in the config.txt file refer to the Raspberry Pi documentation website.
If the screen is still not perfectly configured for the device, a few other tweaks can be made to the config.txt file. Adjust the overscan parameters to add or remove pixels on the edges. For example, adding 33 pixels to the “overscan_right” parameter corrects overflow of the image on the right side of the screen. This takes a few trial and error attempts to perfect.
With only a few changes to the Raspberry Pi’s default configuration file the TFT can become compatible with the Raspberry Pi. This display is a great choice for interfacing with the Raspberry Pi because it has an HDMI connection type which makes for any easy setup. After the resolution and is set to a desired value we can now optimize the touch feature of the display. See here for more information on how to further calibrate this display.
Buyers and others who are developing systems that incorporate FocusLCDs products (collectively, “Designers”) understand and agree that Designers remain responsible for using their independent analysis, evaluation and judgment in designing their applications and that Designers have full and exclusive responsibility to assure the safety of Designers" applications and compliance of their applications (and of all FocusLCDs products used in or for Designers’ applications) with all applicable regulations, laws and other applicable requirements.
This application note will review the settings contained in the config.txt file located in the Raspberry Pi’s boot startup routine. An indicator that the configuration file needs to be edited is if the Raspberry Pi screen goes blank a few moments after starting up. This is an indicator that the device does not recognize the display and is not applying the right settings. If you have edited the configuration file to indicate the correct resolution settings and the display still does not respond, it is possible that the display mode is incorrect.
The CEA mode is the standard mode for displays such as TVs. The DMT mode is the standard mode of computer monitors. Choosing between the modes can be done through the tvservice commands on the Linux terminal. The commands to indicate the available modes for the display are as follows:
An export log is available of the processes the Raspberry Pi goes through in determining the resolution of the connected display. This can be done through terminal commands that show the EDID (Extended Display Identification Data) file of the determined display. The EDID data file is a more detailed resource for finding a display resolution compatible with the connected display. The following command will show the EDID file.
The default firmware will use the EDID parser to try and identify the HDMI connected display and then will select the corresponding video mode and resolution. Through this command you will see the selection process of the parser and the alternative available modes. You will need to use a virtual connection to view the Linux kernel command line or have a view of the terminal.
Choose a mode that is the closest to the screen resolution specified on your displays data sheet. The tvservice command will offer the available resolutions for the display and the corresponding refresh rate. A previous application note further explains how to set the DMT mode resolution. In a similar process the CEA mode can be set to define the display resolution. This is done by adding the following settings in the config.txt file located in the boot file of the Raspberry Pi. The following example would be for an 800x480 resolution display (E70RC-FW850-R).
After the config.txt file is edited and saved, the Raspberry Pi can be rebooted into the new configuration mode and should display in the correct dimensions. If the display is not recognized after these changes have been made there are a few additional changes to consider. The first would be to boost the HDMI signal through the following command. Certain HDMI cables can occasionally be unreliable when the Linux kernel is identifying the display mode.
In some cases, the custom HDMI mode “hdmi_cvt” function does not work for the first group of CEA displays. To customize the parameters to fit the display you will pick the closest CEA mode and alter the overscan and framebuffer values. For example, the 480x800 display has a default CEA mode closest to mode 3 which has a resolution of 480x853. This mode can be chosen and adjusted using the overscan parameters to add or remove pixels from the edges to fit the display.
The negative overscan parameters that are used to remove black borders will often not affect the display when using the HDMI interface. To remove the black borders around the edges of the display you can increase the frame buffer parameters in the config.txt file.
This will force the Raspberry Pi to define a frame buffer and resolution of 480x800. The true frame buffer value that the Raspberry Pi uses is the resolution combined with the defined or undefined overscan values. You can increase the framebuffer width and height values to force a negative overscan value which will remove the black borders around the display.
Different combinations of adjustments and modes can be tried to find the perfect match for your display. More information on the functions explained in this document and others are available on the Raspberry Pi website in their documentation section. For any questions or additional help in setting up your display please visit www.FocusLCDs.com.
Buyers and others who are developing systems that incorporate FocusLCDs products (collectively, “Designers”) understand and agree that Designers remain responsible for using their independent analysis, evaluation and judgment in designing their applications and that Designers have full and exclusive responsibility to assure the safety of Designers" applications and compliance of their applications (and of all FocusLCDs products used in or for Designers’ applications) with all applicable regulations, laws and other applicable requirements.
First of all, you have to make sure that the 3.5"display driver software is installed the proper way. The cheap 3.5" Displays froam AliExpress and the like, mostly use the drivers https://github.com/goodtft/LCD-show.git. Th thing is that the scripts form this reposotory tend to make a lot more changes then necessary, as is explained by Avik Das https://medium.com/@avik.das/setting-up-an-lcd-screen-on-the-raspberry-pi-2018-edition-d0b2792783cd.
Step 3 is to configure raspi2fb to clone fb0 to fb1 (fb0 is HDMI and fb1 is the 3.5" LCD/Touchscreen. To do this it is enough to follow the install instructions on https://github.com/AndrewFromMelbourne/raspi2fb in the section Raspbian Jessie
There are a few options for powering the Pi and the display. If you wanted, you could power the Pi and the display using separate power adapters, but we"re going to power the Pi directly, then use jumper cables to supply power to the display board.
The kit comes with four jumper cables, but, for a Raspberry Pi 4, you need cables for only two pins: 5V and GND. Connect one cable to the 5V pin on the Pi and the 5V pin on the display board. Then connect to a GND pin on the Pi and the GND pin on the display board. See the image for details.
The 3.5 inch LCD Display is directly pluggable into a Raspberry Pi and perfectly fits various Pi models from B+ to Raspberry Pi 3B+. It is a brilliant alternative for an HDMI monitor. When set up, it behaves as a human-machine interface enabling the user to prototype with the Raspberry Pi device anywhere at any time.
Raspberry Pis are so convenient because they"re inexpensive and small, but connecting one to its own monitor, keyboard and mouse requires a lot more space and money. If you"re just trying to program on the Pi or use it to control electronics such as lights, motors and sensors, there"s no need to connect it to a display or input devices because you can control the system remotely, using a VNC or SSH client on your main computer. We call this screenless install a headless Raspberry Pi setup.
By default, the Raspberry Pi"s official operating system, Raspberry Pi OS (formerly known as Raspbian), installs with all forms of remote access disabled. But the good news is that you don"t need to connect to a monitor and keyboard in order to turn them on. By following the instructions below, you can create a headless Raspberry Pi that"s ready for remote access before you boot it up for the very first time. If you have a monitor and keyboard on hand, you can also see our guide on How to Set Up a Raspberry Pi for the First Time.
1. Insert a microSD card into your computer. Your card should be 8GB or larger (the lite version of Raspberry Pi OS will use less space). We have a list of the best microSD cards for Raspberry Pi to help you choose one that optimizes performance.
When it"s done, you can pop your card into a Raspberry Pi, boot it up, wait a few seconds for it to get onto the network and attempt to log in via SSH, provided that you"re using a Wi-Fi network and both the Pi and your client PC are connected to it.
Let"s say you already wrote a card, but forgot to enter the correct Wi-Fi credentials in Raspberry Pi Imager. Or perhaps you moved to a different Wi-Fi network. You can still change the Wi-Fi network, without attaching a screen and keyboard to the Pi.
To setup a Wi-Fi connection on your headless Raspberry Pi, open the microSD card on your PC. Then create a text file called wpa_supplicant.conf, and place it in the root directory of the microSD card. You will need the following text in the file.country=US
Change the country to "GB" for the UK or to another country code for a different country, and enter your actual SSID and password. Upon boot up, Raspberry Pi OS will log you into that network. However, if you"re on a public Wi-Fi network that requires you to click "Ok" on a splash page before you get Internet, this method won"t work.
Prefer to use Ethernet? If you plug your Raspberry Pi directly to a wired network, you should be able to access it by its name (raspberrypi or raspberrypi.local) without changing any other files.
If your PC has a spare Ethernet port or you have an Ethernet-to-USB dongle, you can use a network cable to go directly from your Pi to your computer. Just make sure that you have Bonjour installed on your PC and SSH enabled on the Pi (see above). Then, you can just connect the two devices over Ethernet.
A working Raspberry Pi system requires lots of other parts in addition to the tiny Pi board itself. You"ll need a power supply, a mouse, various cables, and, unless you already own one, a monitor to display screen output for your Raspberry Pi system. Raspberry Pi users are accustomed to hunting up old monitors from long-discarded computers, or temporarily requisitioning a monitor from a currently running system to use as a display for the Rasp Pi.
The clutter of a full-size monitor, however, often invades the elegant simplicity of the Raspberry Pi. Monitors tend to be big and bulky, and they typically require their own power cable, which adds more congestion and complication to the tabletop configuration. A Rasp Pi by itself can inhabit an unobtrusive corner of the room, but add a monitor to it, and it really doesn"t look much different from a conventional PC.
Some users solve the monitor problem by running their Rasp Pi headless through an SSH connection, but SSH requires you to boot another computer on the network (which, undoubtedly, has its own monitor anyway).
Since the first days of the Rasp Pi, users have dreamed of a mini-monitor that runs on the Rasp Pi power and is tailored for the needs of the Rasp Pi environment. Some third-party Rasp Pi displays have appeared in the past, and we have reviewed some in this magazine, but those who follow the Pi have known for some time that the Raspberry Pi Foundation would eventually announce an official Pi display.
The Raspberry Pi display [1] was announced on September 8. In addition to serving as a general device for viewing screen output, according to the foundation, the new display also "gives users the ability to create all-in-one, integrated projects such as tablets, infotainment systems, and embedded projects." The new 7-inch display has touchscreen capabilities. With a price tag of $60, the Rasp Pi display came to market nine months past its originally planned release date [2]. The foundation has explained that the delays resulted from efforts to integrate the Raspberry Pi 2 and difficulties encountered in locating a supplier for the screen.
The display screen measures 7 inches across the diagonal or 155x86mm. The entire screen, including the frame, measures 194x110mm, and the overall depth, minus an attached Rasp Pi, is about 20mm, with a weight of 277 grams. The screen has 10-finger capacitative touch, although standard Linux desktop environments currently do not handle touch gestures well.
The Rasp Pi supports a number of display interfaces, such as HDMI. For some screens that are already available for the Raspberry Pi, the little computer also relies on the GPIO interface. The Raspberry Pi Foundation looked to the underused Display Serial Interface (DSI) in order to connect the Rasp Pi with the screen . You will find the DSI port on the side that is opposite from the network and USB ports.
The DSI connector transmits more than just images. It also sports an integrated I2C-Bus, which makes it possible to transmit gesture entries and control signals for background lighting. As a result, the screen will only work with second-generation Raspberry Pis or the plus models, which are the first series Rasp Pi A+ and the B+. The display board does have two extra pins for the Rasp Pi B. However, according to Pi developer Gordon Hollingworth, the foundation still needs to work on support for the pins.
The first purchasers receive the display as a kit that requires assembly. Even though no assembly instructions are included, the components are easily put together. You should first set the display board upside down next to the screen and connect the board to the ribbon cable that comes out of the screen. Then, turn the board over and adjust it so you can properly mount it.
Next, very carefully plug the second ribbon cable that comes out of the screen into the small jack on the front side of the display board. This cable carries signals from the touchscreen. With the braid side facing upwards, plug in the ribbon cable, which will be connected to the Rasp Pi, and then, using a spacer, screw the board to the screen (Figure 1).
Now you need to decide how you want to supply power to the Rasp Pi and to the screen. Like the Rasp Pi, the screen has a micro USB connector, which means you can either run the power from the display to the Rasp Pi via the USB jack, or you can use the jumper cables that are included to wire the Rasp Pi for 5V and GND with the pins that are on the pin strip. We chose the jumper cable method for our test. The first step is to connect the red cable to the 5V pin and the black cable to the GND pin, then set the Rasp Pi on the spacer. Then, connect the two connectors to the 5V and GND on the Rasp Pi.
Figure 2 shows the pin assignment of the GPIO port for a Raspberry Pi 2. To reduce the size of the depth of this arrangement, you can also mount the Rasp Pi the opposite way around to the display board. The final step to this process is to connect the DSI cable with the USB power supply (Figure 3).
Figure 2: The GPIO pin assignment for a Raspberry Pi 2. The user will find the 5V and GND pins across from pins 2 and 3 for connecting to a power supply.
With respect to the software, all you need to do is update the system (Listing 1). If updates are not properly installed, you will be able to see images on the screen, but the screen will not accept any entries. After a restart, the Rasp Pi will promptly display the image that is familiar from the HDMI port on the screen without any modifications to the system. Touch entries will also immediately function properly within the X server GUI. The 800x480 resolution should suffice for everyday use, even though it is not a substitute for a desktop monitor (Figure 4). The touchscreen has the same level of precision as tablets or smartphones that are currently available on the market.
Figure 4: The 800x480 resolution of the RasPi touchscreen is sufficient for most projects. The Matchbox keyboard from the package sources even gives the user a virtual keyboard.
You can install a virtual keyboard like the Matchbox keyboard in order to enter text without a USB keyboard (Listing 2). Typical desktop environments like LXDE from Rasbpian generally do not function properly with touchscreen entries. The problems are especially noticeable in the web browser, where you can"t just type and scroll from just anywhere on a page. Instead, you need to use the scroll bar on the edge of the window, which is hard to do with a finger. It is likewise difficult to use touch gestures for adjusting the size of program windows.
Connecting the Rasp Pi display screen through the DSI port frees the HDMI port, which is then available for attaching a second monitor. However, you do not automatically get an image on a second monitor. Instead, you first need to indicate to the program, such as a video player, that you would like to send the images to an external screen.
The example from Listing 3 starts the video on the second screen while the GUI on the Raspberry Pi screen remains free for other activities. At this point, there is still no genuine dual-display function that turns the Rasp Pi display and a monitor connected via HDMI into a large display. The graphical tools used for setting up the resolution via Menu | settings | screen settings still only recognize the Rasp Pi screen. Instructions for manually configuring a monitor set up via the /etc/X11/xorg.conf file are not yet available.
Interfacing a Touchscreen LCD with a Raspberry Pi is very useful as this setup can be used to develop Raspberry Pi based stand-alone systems like Weather Monitoring Stations, Security Systems, and Camera Interfacing etc. Adding a Touchscreen to your Raspberry Pi opens up doors to a lot of projects as well as increases the portability of the system.
Having a nice LCD Display on your Raspberry Pi can allow us to make complex projects like a media center, personal computer, smart phone, tablet, etc.
There are different types of Touchscreen LCDs available in the market today for Raspberry Pi from different manufacturers with different screen sizes, resolutions, operable with stylus, etc.
In this project, we will see how to setup an LCD Touchscreen on Raspberry Pi. For this project, we have chosen a WaveShare SpotPear 3.2 inch RPi LCD V4 touchscreen type LCD display.
NOTE: We’ll show you how to setup WaveShare 3.2 inch LCD with Raspberry Pi using the official drivers and also the provided Raspbian image. We tried to install this using our own Raspbian Jessie and Drivers but there were some problems. We will definitely update how to install any type of LCD with Raspberry Pi very soon.
There are different manufacturers of Touchscreen LCD displays for Raspberry Pi like Adafruit, Newhaven Display, Haoyu, Freetronics, WaveShare, Watterott Electronics and many more but we thought Touchscreen LCD displays from WaveShare for Raspberry Pi are affordable, easy to use and comes with drivers and their own version of Raspbian OS (our thoughts and might differ with other users).
There are many variants of Touchscreen LCDs from WaveShare like 2.8 inch, 3.2 inch, 3.5 inch, 5 inch, 7 inch, 10.1 inch etc. For setting up an LCD Touchscreen with Raspberry Pi, we are going to use a 3.2 Inch WaveShare SpotPear LCD.
This particular LCD Display has a Resistive Touchscreen with a screen resolution of 320×240. It is interfaced to Raspberry Pi using SPI protocol. The LCD module has 3 user button that can be programmed to do additional functions.
The Wave Share 3.2 inch display can be directly plugged in to the Raspberry Pi on the GPIO Pins. It uses 26 Pins of the available 40 pins of the Raspberry Pi’s GPIO. Out of the 26 pins used, some do not have any connections (NC – No Connection).
First we will see the Pinout of the Raspberry Pi GPIO and then we will see the relevant pins required to connect LCD using SPI. The following image shows the pin out of Raspberry Pi’s GPIO Pins.
In these 40 pins, the connector on the back of the WaveShare 3.2 inch LCD has 26 pins (2 rows with 13 pins in each). The following table gives the list of pins we are going to need to interface the LCD with Raspberry Pi.
Write this image file on to the microSD card, insert it into Raspberry Pi and boot the Pi with LCD inserted on the Raspberry Pi. The Raspberry Pi directly enable the Touchscreen LCD display.
But, if we want to use our Raspberry Pi with any OS of our choice, like Raspbian Jessie for example, first thing we need to do is download the drivers for the LCD Module from the website.
Assuming you have already setup the Raspberry Pi using the headless setup (no monitor or keyboard), we will proceed by copying the downloaded driver file in to the Raspberry Pi’s memory (microSD Card).
Download the WinSCP and install it. Once the installation is completed, open the WinSCP application. As soon as you open it, you will be asked to enter the details of the session. Select File Protocol as SFTP (SSH File Transfer Protocol) and enter the IP Address of the Raspberry Pi in the Host name field.
Enter those details as per your settings (if default settings are unchanged, username is pi and password is raspberry). After successful login, you will enter into the main screen of the WinSCP application.
The screen is divided in to two halves and the left side the host computer (in our case the Windows PC which we are using) and the right side is the SSH connection (Raspberry Pi).
On the left side, go to the folder where you have downloaded the LCD Driver file. In our case, it is located on the Desktop. On the right side, go to home/pi folder. Drag and drop the LCD Driver File from left side to right side.
You will get a message about file transfer and just press ok. The file is now transferred from my desktop to Raspberry Pi. You can now disconnect the Raspberry Pi from WinSCP (Session Disconnect).
Now, open Putty and login in to Raspberry Pi. After logging in successfully, we need to extract the contents of the LCD Driver file. To see the list of files and directories, you can enter the following command and press enter.
Aft