arduino sainsmart 3.2 tft lcd example manufacturer
SainSmart 3.2" TFT LCD Display is a LCD touch screen module. It has 40pins interface and SD card and Flash reader design. It is a powerful and mutilfunctional module for your project.The Screen include a controller SSD1289, it"s a support 8/16bit data interface , easy to drive by many MCU like STM32 ,AVR and 8051. It is designed with a touch controller in it . The touch IC is ADS7843 , and touch interface is included in the 40 pins breakout. It is the version of product only with touch screen and touch controller.
2.Put the SD libraries(ITDB02_Graph16、ITDB02_tinyFAT16 and tinyFAT) into the folder arduino-0023/libraries ,then upload the ino File/Examples/ITDB02_tinyFAT16/_240x320_Portrait.After reset, you can see the image in screen.
Note:The SD library only can be use in version arduino-00xx and the library only supports FAT16 fomatted SD card up to 2GB, so you need to fomat your SD card to FAT16. 4GB FAT16 fomatted SD card is tested not working. Long file names are not supported. Keep your file names compliant with 8.3 standard.
SainSmart 3.2" TFT LCD Displayis a LCD touch screen module. It has 40pins interface and SD card and Flash reader design. It is a powerful and mutilfunctional module for your project.The Screen include a controller SSD1289, it"s a support 8/16bit data interface , easy to drive by many MCU like STM32 ,AVR and 8051. It is designed with a touch controller in it . The touch IC is ADS7843 , and touch interface is included in the 40 pins breakout. It is the version of product only with touch screen and touch controller.
In this Arduino touch screen tutorial we will learn how to use TFT LCD Touch Screen with Arduino. You can watch the following video or read the written tutorial below.
For this tutorial I composed three examples. The first example is distance measurement using ultrasonic sensor. The output from the sensor, or the distance is printed on the screen and using the touch screen we can select the units, either centimeters or inches.
The next example is controlling an RGB LED using these three RGB sliders. For example if we start to slide the blue slider, the LED will light up in blue and increase the light as we would go to the maximum value. So the sliders can move from 0 to 255 and with their combination we can set any color to the RGB LED, but just keep in mind that the LED cannot represent the colors that much accurate.
The third example is a game. Actually it’s a replica of the popular Flappy Bird game for smartphones. We can play the game using the push button or even using the touch screen itself.
As an example I am using a 3.2” TFT Touch Screen in a combination with a TFT LCD Arduino Mega Shield. We need a shield because the TFT Touch screen works at 3.3V and the Arduino Mega outputs are 5 V. For the first example I have the HC-SR04 ultrasonic sensor, then for the second example an RGB LED with three resistors and a push button for the game example. Also I had to make a custom made pin header like this, by soldering pin headers and bend on of them so I could insert them in between the Arduino Board and the TFT Shield.
Here’s the circuit schematic. We will use the GND pin, the digital pins from 8 to 13, as well as the pin number 14. As the 5V pins are already used by the TFT Screen I will use the pin number 13 as VCC, by setting it right away high in the setup section of code.
I will use the UTFT and URTouch libraries made by Henning Karlsen. Here I would like to say thanks to him for the incredible work he has done. The libraries enable really easy use of the TFT Screens, and they work with many different TFT screens sizes, shields and controllers. You can download these libraries from his website, RinkyDinkElectronics.com and also find a lot of demo examples and detailed documentation of how to use them.
After we include the libraries we need to create UTFT and URTouch objects. The parameters of these objects depends on the model of the TFT Screen and Shield and these details can be also found in the documentation of the libraries.
So now I will explain how we can make the home screen of the program. With the setBackColor() function we need to set the background color of the text, black one in our case. Then we need to set the color to white, set the big font and using the print() function, we will print the string “Arduino TFT Tutorial” at the center of the screen and 10 pixels down the Y – Axis of the screen. Next we will set the color to red and draw the red line below the text. After that we need to set the color back to white, and print the two other strings, “by HowToMechatronics.com” using the small font and “Select Example” using the big font.
Now we need to make the buttons functional so that when we press them they would send us to the appropriate example. In the setup section we set the character ‘0’ to the currentPage variable, which will indicate that we are at the home screen. So if that’s true, and if we press on the screen this if statement would become true and using these lines here we will get the X and Y coordinates where the screen has been pressed. If that’s the area that covers the first button we will call the drawDistanceSensor() custom function which will activate the distance sensor example. Also we will set the character ‘1’ to the variable currentPage which will indicate that we are at the first example. The drawFrame() custom function is used for highlighting the button when it’s pressed. The same procedure goes for the two other buttons.
drawDistanceSensor(); // It is called only once, because in the next iteration of the loop, this above if statement will be false so this funtion won"t be called. This function will draw the graphics of the first example.
getDistance(); // Gets distance from the sensor and this function is repeatedly called while we are at the first example in order to print the lasest results from the distance sensor
So the drawDistanceSensor() custom function needs to be called only once when the button is pressed in order to draw all the graphics of this example in similar way as we described for the home screen. However, the getDistance() custom function needs to be called repeatedly in order to print the latest results of the distance measured by the sensor.
Ok next is the RGB LED Control example. If we press the second button, the drawLedControl() custom function will be called only once for drawing the graphic of that example and the setLedColor() custom function will be repeatedly called. In this function we use the touch screen to set the values of the 3 sliders from 0 to 255. With the if statements we confine the area of each slider and get the X value of the slider. So the values of the X coordinate of each slider are from 38 to 310 pixels and we need to map these values into values from 0 to 255 which will be used as a PWM signal for lighting up the LED. If you need more details how the RGB LED works you can check my particular tutorialfor that. The rest of the code in this custom function is for drawing the sliders. Back in the loop section we only have the back button which also turns off the LED when pressed.
In order the code to work and compile you will have to include an addition “.c” file in the same directory with the Arduino sketch. This file is for the third game example and it’s a bitmap of the bird. For more details how this part of the code work you can check my particular tutorial. Here you can download that file:
drawDistanceSensor(); // It is called only once, because in the next iteration of the loop, this above if statement will be false so this funtion won"t be called. This function will draw the graphics of the first example.
getDistance(); // Gets distance from the sensor and this function is repeatedly called while we are at the first example in order to print the lasest results from the distance sensor
Spice up your Arduino project with a beautiful large touchscreen display shield with built in microSD card connection. This TFT display is big (3.2" diagonal) bright (5 white-LED backlight) and colorful (18-bit 262,000 different shades)! 240x320 pixels with individual pixel control. As a bonus, this display has a optional resistive touch panel with controller XPT2046 attached by default and a optional capacitive touch panel with controller FT6206 attached by default, so you can detect finger presses anywhere on the screen and doesn"t require pressing down on the screen with a stylus and has nice glossy glass cover.
The shield is fully assembled, tested and ready to go. No wiring, no soldering! Simply plug it in and load up our library - you"ll have it running in under 10 minutes! Works best with any classic Arduino (UNO/Due/Mega 2560).
Of course, we wouldn"t just leave you with a datasheet and a "good luck!" - we"ve written a full open source graphics library at the bottom of this page that can draw pixels, lines, rectangles, circles and text. We also have a touch screen library that detects x,y and z (pressure) and example code to demonstrate all of it. The code is written for Arduino but can be easily ported to your favorite microcontroller!
If you"ve had a lot of Arduino DUEs go through your hands (or if you are just unlucky), chances are you’ve come across at least one that does not start-up properly.The symptom is simple: you power up the Arduino but it doesn’t appear to “boot”. Your code simply doesn"t start running.You might have noticed that resetting the board (by pressing the reset button) causes the board to start-up normally.The fix is simple,here is the solution.
Reason: The hooks on the backight of ER-TFT032-3.1 is always complained by most customers for inconvenient assembly. So we cancel the hooks in the new version of ER-TFT032-3.2.That"s the only difference for these two versions.
ER-TFT032-3.2 is 240x320 dots 3.2" color tft lcd module display with ILI9341 controller and optional 4-wire resistive touch panel and 3.2 inch capactive touch panel with controller FT6236,superior display quality,super wide viewing angle and easily controlled by MCU such as 8051, PIC, AVR, ARDUINO ARM and Raspberry PI.It can be used in any embedded systems,industrial device,security and hand-held equipment which requires display in high quality and colorful image.It supports 8080 8/16-bit parallel,3/4-wire serial interface. FPC with zif connector is easily to assemble or remove.Lanscape mode is also available.
Of course, we wouldn"t just leave you with a datasheet and a "good luck!".Here is the link for 3.2"TFT Touch Shield with Libraries, Examples.Schematic Diagram for Arduino Due,Mega 2560 and Uno . For 8051 microcontroller user,we prepared the detailed tutorial such as interfacing, demo code and development kit at the bottom of this page.
LCD Display Modules└ LEDs, LCDs & Display Modules└ Electronic Components & Semiconductors└ Electrical Equipment & Supplies└ Business & IndustrialAll CategoriesAntiquesArtBabyBooks & MagazinesBusiness & IndustrialCameras & PhotoCell Phones & AccessoriesClothing, Shoes & AccessoriesCoins & Paper MoneyCollectiblesComputers/Tablets & NetworkingConsumer ElectronicsCraftsDolls & BearsMovies & TVEntertainment MemorabiliaGift Cards & CouponsHealth & BeautyHome & GardenJewelry & WatchesMusicMusical Instruments & GearPet SuppliesPottery & GlassReal EstateSpecialty ServicesSporting GoodsSports Mem, Cards & Fan ShopStampsTickets & ExperiencesToys & HobbiesTravelVideo Games & ConsolesEverything Else
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:
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
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 ?
My Touchscreen is now working fine.The problem was for the ribbon cable on the back side of LCD.It was not connected properly.I just tighted the cable and it worked fine.Hope it will be useful tip.
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.
[ 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
thank you for your great tutorial, it got me on the right way. unfortunataly i only see some boot messages on the lcd and then it turns black. maybe you could give me a hint on how to get it working entirely.
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.
[ 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 :)
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
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.
Expecting this would builtin driver module within kernel and help with avoiding mistakenly overwriting anything. But with this is cause LCD screen to go blank white and no boot activity. Also noticed on HDMI it get stuck on Initial rainbow screen and stuck on that.
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.
Great tutorial thanks; got an X session working great 1st time. Has anybody managed to get Kodi/XMBC working on the LCD either Kodi standalone, Raspbmc or Xbian?
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
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 have exactly the same problem. I also installed a new version of Raspbian, and the LCD part works fine (except all the windows are way too large), but the touch part doesn’t work at all… I’m using Waveshare Spotpear 3.2″ V4.
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.
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.
The SainSmart 3.2 sold by MicroCenter (20-111-971) is actually the exact same WaveShare SpotPear v3 documented here. So maybe your 2.8 would work if you tried a WaveShare driver?
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.
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.
Anyway, I was able to do the rest of the steps with no problem. LCD didn’t work, but I am using a Waveshare 3.5, which doesn’t look to be supported yet. Mostly I am trying to play around and see if I can get it working somehow. Anyone found a way to do this yet?
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.
Thanks for the tutorial. It works, but I get the boot/command line stuff on the HDMI monitor and the LCD only comes on when I do startx. Is there a way to get everything to appear on the LCD screen?
Now the OS freezes at the emulation station loading screen, and if I connect my lcd it gives me a lot of error messages which I can only see on the 3.2 inch screen.
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.
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.
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.
After 4 lost days I just decided to get another screen, a Waveshare 3.2 (just like the one on this tutorial), I’ll follow these steps and see if it work for me.
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 ??
I am using the same LCD and followed your tutorial. Have your tested the guide lately? Are you certain that it works? I see the boot messages on console but I get white screen as GUI starts.
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?
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.
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.
Is it normal the white back light during the whole process of initializing (I suspect that during the transportation trere is a deffect)? The problem is that I missed the step #1 and I performed it at the end. Unfortunately I don’t have any monitor available right now – neither “normal”, neither LCD :))))). Is it possible turning back the system or the only option is reinstallation of the 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
once you install the drivers it replaces the kernel by disabling hdmi output and enables it for LCD. i don’t think we have a solution to get em both working at the same time. ( you are encouraged to search for it )
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 used this link though (smaller file ~ 50 KB, fast download) http://www.waveshare.com/w/upload/4/4b/LCD-show-161112.tar.gz and replaced LCD4-show with LCD32-show in the last line.
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.
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
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 .
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:
Could you provide me with a os image of open elec that you already built for the waveshare spotpear v4 3.2 inch touchscreen,because I cannot make sense of your website’s instructions?
In the case of the WaveShare driver, their setup script from their “LCD_show” repository will copy a device-tree overlay to /boot/overlays/ that provides most of the module config etc via boot-time device-tree patch.
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.
Over the past year, I"ve ordered 47 of these SainSmart LCD displays. For a while, they had a good thing going, but in the Autumn of 2015, they changed their manufacturing and have utterly messed up this device. The first six that I ordered in the Summer of 2015 worked perfectly. But of the 41 devices that I"ve ordered after the change, 40% have failed right out of the box... 6 won"t power up at all, 4 have screen flicker, 2 the touch doesn"t work, 1 the LCD pixels were misaligned and 1 had a cracked screen. What happened? Besides utter lack of quality control (these displays were obviously never tested), SainSmart changed the LCD screen hardware. Instead of using the LCD screen that would fit properly on the TFT_320QVT PCB (see pictures), they chose a slightly thinner, narrower LCD screen that normally fits the TFT_320QDT PCB. (notice the one letter difference). The problem is that the new screen DOES NOT FIT properly into the pin holes on the PCB and has a nasty habit of falling off (see pics). They obviously realized this at the factory, and rather than re-ordering the correct screens, they just tried to force them to stay on with double sided tape. But that hasn"t worked well. Many of my screens had fallen off by the time I received them! But because I own a business that uses these things and I didn"t know at the time that I could find alternative suppliers for this part, my work-around was to glue them into the best position possible using a hot glue gun. What a pain! Moral of the story: Don"t order any of these from SainSmart LCDs until they have accepted they have screwed this up and fixed this problem. I suspect they will comment on this review once that has happened and I"ll make modifications to this review to let you know when the problem is fixed. Until then, BUYER BEWARE. And, any other SainSmart product that includes this 3.2" is very likely going to include this same problem - including the shield + LCD and Mega2560 + shield + LCD. That all said, when this thing works, it works really well. I am satisfied with resolution and the touch is responsive. I use it in the product that our company sells. Just don"t get it from Sainsmart - for now. There are alternative suppliers.A couple final technical notes:* The SD slot will not work with any SDHC cards. And no, you can"t reformat a larger SDHC card down to 2GB and get it to work. Won"t work. You can however get a 2GB or 4GB SD Card (not SDHC) and it"ll work fine. You may see some documentation suggesting a 2GB limitation, but it"s really 4GB as long as you don"t use a SDHC card. Did I mention, do not use SDHC? If you need to understand the difference, google "SD vs SDHC".* The screen IC driver comes in two flavors out there: SSD1289 and ILI9341. They both work, but the software configuration is slightly different. So, either use one or the other - or expect to somehow auto-detect which one connect to your Mega2560 (not possible directly) and then code for both possibilities. As far as I can tell, the SSD1289 is being phased out for the now more common ILI9341. I"ve ordered this device from a number of sites, but unfortunately they often list the item as SSD1289, but it arrives as a ILI9341. If you are new to this, my advice is to go with the ILI9341 driver. The UTFT library was updated in the Summer of 2016 to accommodate this newer driver. Another reason to pass on this Sainsmart device is that it uses the SSD1289 driver. How can you tell the difference? The model for SSD1289 is TFT_320QVT and the model for ILI9341 is TFT_320QVT_9341. Unfortunately, ads for these devices often have the wrong model number displayed!
The answer of course depends on the exact model of the TFT that we have on hand. The below instructions apply to a generic 3.2″ TFT with wide aspect ratio and resolution of 240 x 400 that I got off of Ebay.
For example, pin 2 (the second pin on the flex cable looking at it from the left) corresponds to the DB0 signal which should be connected to the D37 pin on the Arduino MEGA (or Due). Note that the connections are made according to UTFT’s documentation and are applicable specifically to UTFT.
So we have to connect signals D0 through to D15 to the necessary digital pins. Then we also have to connect pins RS, WR, CS and REST to whichever pins we like (we must declare these pins in our sketch, see UTFT documentation). Pin 11 is RD and it must be pulled high, which means connecting it to +3.3V. Pin 37 is the backlight illumination which means it must also be connected to +3.3V. This leaves pin 1 which must be connected to ground and pin 3 which must be connected to Vcc which in our case is 5V.
Note that I have not really gotten around to using the touchscreen capabilities or the SD reader, so I have not connected them to my Arduinos. It shouldn’t be difficult though.
Now, there is one more thing that I should point out and it is very important. The Arduino MEGA is using 5V logic while the TFT is expecting 3.3V logic. This means that if you connect the D0-D15 and RS, WR, CS, REST lines directly to the MEGA you will most likely damage the TFT. You need to connect a 10K resistor in series with each and every one of the lines. That will bring the voltage down to acceptable levels. Do not forget to do this!
Im guessing the 1.8 would be so small it would be uncomfortable. But the 3.2 should work, right? Do any of you know of any tutorials interfacing these two?
3.2"inch TFT LCD Module Display Power than SainSmart w/Resistive Touch,Tutorial. 3.2"TFT LCD Display with Breakout Board andwith Resistive Touch Panel. 3.2"TFT LCD Display with Breakout Boardand with Capacitive Touch Panel. I t supports 8080 8-bit /9-bit/16-bit /18-bit parallel ,3-wire,4-wire serial spi interface.Built-in optional microSD card slot, optional. Description E R-TFTM032-3 is 240x320 dots 3.2" color tft lcd module display with ILI9341 controller board,superior display quality,super wide viewing angle and easily controlled by MCU such as 8051, PIC, AVR, ARDUINO,ARM and Raspberry PI.It can be used in any embedded systems,industrial device,security and hand-held equipment which requires display in high quality and colorful image. I t supports 8080 8-bit /9-bit/16-bit /18-bit parallel ,3-wire,4-wire serial spi interface.Built-in optional microSD card slot, optional 3.2 inch 4-wire resistive touch panel with controller XPT2046 an d 3.2 inch capacitive touch panel with controller FT6236 . It"s optional for font chip, flash chip and microsd card. W e offer two types connection,one is pin header and the another is ZIF connector with flat cable mounting on board by default and suggested. Lanscape mode is also available. O f course, we wouldn"t just leave you with a datasheet and a "good luck!".Here is the link for 3.2"TFT Touch Shield with Libraries, EXxamples.Schematic Diagram for Arduino Due,Mega 2560 and Uno . For 8051 microcontroller user,we prepared the detailed tutorial such as interfacing, demo code and Development Kit at the bottom of this page.3D drawing is available. 3.2 inch Series TFT Display L ist ↓ Display Part Number Description ER-TFT032-2(RTP) 3.2" TFT LCD 240x320 Pixels Display with Controller ic ILI9320 and Resistive Touch Panel ER-TFT032-3.1(RTP) 3.2" TFT LCD 240x320 Pixels Display with Controller ic ILI9341 and Resistive Touch Panel ER-TFT032-3.1(CTP) 3.2" TFT LCD 240x320 Pixels Display with Controller ic ILI9341 and Capacitive Touch Panel ER-TFT032A3-3(RTP) 3.2" TFT LCD 240x320 Pixels Display with Controller ic ST7789V and Resistive Touch Panel ER-TFT032A3-3(CTP) 3.2" TFT LCD 240x320 Pixels Display with Controller ic ST7789V and Capacitive Touch Panel ER-TFTM032-3(RTP) 3.2"TFT LCD Display with Breakout Board and with Resistive Touch Panel ER-TFTM032-3CTP) 3.2"TFT LCD Display with Breakout Board and with Capacitive Touch Panel W hat"s inc luded in the package ↓ Num Accessory Name Qty 1 3.2 inch TFT Display with Breakout Board 1 2 3.2" Resistive Touch Panel with controller XPT2046 1 * The touch panel is attached on the display by default. * We default pin header connection , 5V power supply and 4-wire serial interface .Please send message if you want FFC connection , 3.3V power supply and other interface , or buy from our own store [link removed by eBay] . O ptional Accessory List (Click the part number to buy accessories) ↓ Category Part Number Description Flash Chip W25Q128FVSG WINBOND (P/N:25Q128FVSG) 128M Bit Flash Chip MicroSD Card ER3297 New Original MicroSD (TF) 1GB Memory Card Font 1 ER3300-1 15X16 dots fonts chip,it supports Chinese,Japanese(compatible with Unicode) and 150 countries character Font 2 ER3301-1 11X12,15X16 dots fonts chip, it supports Chinese,ASCII and 150 countries character Font 3 ER3303-1 11X12 , 15X16 , 24X24 dots Chinese font, It supports GB2312,GB12345 and ASCII character, also compatible with Unicode Font 4 ER3304-1 12x12,16x16,24x24,32x32 dot matrix Chinese font, supporting GB2312 Simplified Chinese and ASCII * If choose the above accessories,we"ll mount on display by default except the flash chip. Ebay doesn"t allow listings to contain external links,so the documents link may be invalid. Please copy the below entire link to your browser for checking our documents(at the bottom of the page) or for bulk order. https://www.buydisplay.com/default/3-2-inch-capacitive-touchscreen-240x320-tft-lcd-module-display D atasheet - TFT LCD Display,Controller,Connector ↓ Format Documents Name (Downloadable) Version Language Update Date Size 3.2 inch 240x320 Dots Display with Adaptor Board Datasheet 2.0 English Jan-09-2016 709K Controller ILI9341 Datasheet 1.0 English Jul-02-2013 3.2M 40 Pins 1.00mm Pitch ZIF Connector Drawing 1.0 English Apr-19-2013 268K Datasheet - Touch Panel with its Controller IC,Connector ↓ Format Documents Name (Downloadable) Version Language Update Date Size 3.2 inch 4-Wire Resistive Touch Panel Drawing 1.0 English Jun-06-2016 302K Resistive Touch Panel Controller XPT2046 Datasheet 1.0 English May-08-2007 579K 3.2 inch Capacitive Touch Panel Outline Drawing 1.0 English Dec-02-2015 254K Capacitive Touch Panel Controller FT6236 Datasheet 1.0 English Jul-24-2014 674K Datasheet for Flash Memory,MicroSD Card Slot ↓ Format Documents Name (Downloadable) Version Language Update Date Size 128M-BIT Flash W25Q128FV Datasheet 1.0 English Oct-01-2012 1.0M MicoSD Card Slot Drawing 1.0 English Dec-12-2013 1.2M Datasheet for Font Chip ↓ Format Documents Name (Downloadable) Version Language Update Date Size Summary for Font Chip 1.0 English Aug-07-2013 133K ER3300-1 Datasheet 1.0 English May-08-2010 621K ER3301-1 Datasheet 1.0 English Mar-27-2014 2.0M ER3303-1 Datasheet 1.0 English Oct-01-2013 688K ER3304-1 Datasheet 1.0 English Apr-12-2013 935K T utorial - 8051 Microcontroller Demo Code,Interfacing,Development Board&Kit ↓ Format Documents Name (Downloadable) Version Language Update Date Size 3-Wire SPI,Touch Panel,Font Chip,Flash,MicroSD Demo Code 1.0 English Nov-28-2014 180K 4-Wire SPI,Touch Panel,Font Chip,Flash,MicroSD Demo Code 1.0 English Nov-28-2014 180K 8080 8-Bit,Touch Panel,Font Chip,Flash,MicroSD Demo Code 1.0 English Nov-28-2014 179K 8080 16-Bit,Touch Panel,Font Chip,Flash,MicroSD Demo Code 1.0 English Nov-28-2014 179K ER-TFTM032-3 Interfacing Document 1.0 English Aug-2014-23 176K 8051 Microcontroller Development Board & Kit for ER-TFTM032-3 N/A N/A N/A N/A Specification Gross Weight (kg)0.0760 ManufacturerEastRising Continuity SupplyWe promise the long term continuity supply for this product no less than 10 years since 2015. Part NumberER-TFTM032-3 Display Format240x320 Dots Interface8080 8-bit Parallel , 8080 16-bit Parallel , 3-Wire Serial SPI, 4-Wire Serial SPI IC or EquivalentILI9341 AppearanceRGB on Black Diagonal Size3.2” ConnectionPin Header, FFC-Connector Outline Dimension64.9W)x89.4(H)mm Visual Area48.60x64.80mm Active Area48.60(W)x64.80(H)mm Character SizeNo Dot (Pixel) SizeNo Dot (Pixel) Pitch0.2025x0.2025 IC PackageSMT Display TypeTFT-LCD Color Touch Panel OptionalYes Sunlight ReadableNo Response Time(Typ)25ms Contrast Ratio(Typ)500:1 Colors65K/262K Viewing Direction12:00 Viewing Angle RangeLeft:60.0 , Right:60.0 , Up:50.0 , Down:50.0 degree Brightness(Typ)280cd/m2 Backlight ColorWhite Color Backlight Current (Typ)120mA Power Supply(Typ)3.3V, 5V Supply Current for LCM(Max)130mA (Vdd=3.3V) 150mA (Vdd=5V) Operating Temperature-20℃~70℃ Storage Temperature-30℃~80℃ Series NumberER-TFT032-3 About Us We"re China-based global display manufacturer named EastRising Technology Co.,Ltd. that has a worldwide business in design, produce and sell various displays for small to large companies since 2003. Our web site is [link removed by eBay] . Link for video and image of our production line and equipment. RoHS reports for all material we used on display module. Long Term Continuity Supply Warranty We promise the long terms continuity supply and would never end.Some controller IC may stop the production,we"ll try our efforts to find the completely compatible ones.If the equivalent is unavailable, we¡¯ll make the new tooling and use the most similar IC as replacement.So you don"t have to worry even your research time is very long. Shipping Policy All products will be checked carefully and packed in good condition before shipping.We e-mail all customers with tracking information immediately after the shipment for status tracking. Item will be shipped within 1 business day after the payment has been received. Customs fees and import duties for exports are buyer"s responsibility. Warranty All products are covered under our limited warranty, which provides all products are free of functional defects for a period of one year from the date of receipt and all products are free of visual defects and missing parts for a period of 30 days from the date of receipt.If a product was damaged during shipping or the order is incorrect,you must notify us within 2 days of receipt. How to return a product First request an RMA number from our sales with the information:part number,reason for return,order number. Our sales will then either issue an RMA number, ask you for more information, or offer to help you resolve a technical problem so that the product does not need to be returned. Products must arrive here in the same condition as when you received them. You are responsible for return shipping and insurance.Please make sure your RMA number is on the shipping label and on any documents you include with the product. After we receive the product, we inspect it to determine the cause of any defect, then update by email with our findings. This process usually takes five business days.
This module is the 3.2” version of the ESP32 touchscreen display, based on ESP32-WROVER, with a built-in 2M pixel OV2640 camera. The LCD is 320x240 TFT, with driver is ILI9341, it uses SPI for communication with ESP32, the SPI main clock could be up to 60M~80M, make the display smooth enough for videos; and the camera OV2640 with pixel 2M, with this camera, you can make applications such as remote photography, face recognition…
Buying is a Type of Hunting Game. TFT LCD Display For Arduino Buying Guide is an Important Article as No Where There is Any Practical Guide. Practically we will use it as a base either as receiver or the central machinery for some stuffs around Internet of Things. Just for getting started with DIY electronics, we published some articles which possibly will help who are not exactly related to hardware but has more to do with software. Those articles mostly can be found by using the search option on this website, searching with Arduino will help to sort out.
We are avoiding the basic electronic displays like LED display, basic LCD display as we are NOT really related to so basic works of electronics. This website was never for so basic guides. There are hundreds of those basic websites for those guides. Hardware are time consuming to write, most importantly, testing the useless hardware hugely waste our space. It might dishearten our some readers, but basically we need a rapid shift towards our main niche. Ultimately we have to connect with the servers.
We have three options – TFT LCD Display, TFT LCD Touch Display and OLED display. You can check various places, monochrome OLEDs are the choice right now for manufacturing electronic units. OLEDs are hugely power saving but are far better than monochrome LCDs. There is not HUGE options in OLEDs for Arduino. Usage is very lesser in most situations where we will need a display. TFT LCD Touch Display doubles up as an input too. Without a computer, we can do the desired works in the way, suppose we did with the old color mobile phones. Smartphones are mostly a full OS driven, hence can not be compared. Most works which other displays can perform a TFT LCD Touch Display is able to perform.
There are several things to consider. First, it is basically meaningless to buy a bigger display at higher cost. Second, we do not need Mac like beautiful display. Third, connecting the display with various types of Arduino is not exactly very easy. Forth, even the official TFT LCD Touch Display library of Arduino is not fully complete, Adafruit has Open Source contribution. Fifth, there is a firmware of the whole thing, it is kind of “self dependent”. If a cheaper stuff’s library or firm is not compatible, no body’s father reverse engineer it.
We found two company’s name for 2.4″ TFT LCD Touch Displays – one is LuckSender, whose product sold around $4.99 in Ebay, but has a serious detailed pathetic, scary review by an Amazon customer. It probably has problem with compatibility.
Second company we found is named SainSmart. SainSmart is not exactly a small company, it has a modern website (we saw Affiliate link option in footer too – we are never interested to push anyone’s product to our readers), We noticed that, this company’s website has written :
But also we noticed that, SainSmart 3.2″ TFT LCD Display total unit for Arduino sells at Ebay at LESSER price than official website with free shipping. You can probably use the SainSmart’s forum for support. This display stuffs is probably less explored market.
For those who have lesser idea, this total stuff includes a board (shield) and a SD card slot too. $13.00 is not bad pricing for a TFT LCD Touch Display, although (as always) we think, the right price should be $1.30! We are kids, playing, we can not make money out of these, they should “sponsor” us. The market of Arduino is not exactly great right now unlike before, their monopoly is only in boards; Adafruit also not going great. Except display, the market is of China. Do not hurry, watch auctions and it is not improbable to get that brand’s at less than $10.00.