sainsmart 7in lcd touch screen not displaying made in china
Notices: The capability of SD card in used here should be more than 4GB. In this operation, a SD card reader is also required, which has to be purchased separately.
This screen won’t work when you just plug it into your Raspberry Pi, you’ll need to edit a few configuration on boot. Touchscreen I have not tested but included some ideas on how to make it work
To begin with the board itself, it’s okay. The screen display I received was a bit damaged, there were some clearly visible and wide scratches and one component was soldered pretty sideways, but it worked and that was within my expectations for a $50 screen.
Make sure your power supply is rated at a high current. A 500 mA 5 volt supply will not cut it to both power the Pi and the screen. I’ve tested this with a 2A power supply and this worked great. You can plug the USB from the screen into the Pi itself to supply current to it.
This link states that there are two revisions of the waveshares board: 2.1 and 1.1 with the difference being that 2.1 works outside of the box, yet 1.1 would need extra drivers to work properly. It also states that clones of this product are often 1.1 so my best guess is that SainSmart is also based off 1.1
The overall customer support of SainSmart is technically incapable but are generally nice people to deal with. My package got stuck in customs and I had to pay an extra 25 euro, even tho I had explicitly stated that it should be sent from Germany, because I know shit like this happens.
Firstly, as many of you may have found out, the manufacture screwed up and designed this thing UP SIDE DOWN. Which on a small screen you have to adjust you screen to project the image 180 degrees, but when you put it back on the big screen you have to adjust back.
Lastly, there are NO compatible screws for this thing. NONE. M3 is too big. M2.5 is too small. And no matter what you pick, the thread length is too deep, too shallow, or the threads themselves don"t fit well with the hole you are trying to screw them in. You also have the risk of screwing the screws too deep that they could damage the LCD display.
There"s just one problem. Where are the screws? They didn"t come with my 7" screen when I bought it. They didn"t come with this box. And the last stand I had did come with screws but they are too long.
Navigate to Device Drivers -> Input Device Support -> Touch Screens and select it. Go to USB Touchscreen Driver select it. Go to "eGalax, eTurboTouch CT-410/510/700 device support" and select it. Exit all the way and save the file when prompted.
Now your SD card contains the new image. Safely eject the SD card, plug the touch controller to your RPi, boot it with the SD card, run startx, and check that you can move the cursor.
Note: Make sure that you don"t have sections like MatchProduct "eGalax Inc. USB TouchController" in other files from /usr/share/X11/xorg.conf.d/ folder (highest number files are processed last).
Now touchscreen should be calibrated and after reboot it will keep the settings. Yolu can run xinput_calibration again in order to have the pointer to the desired points. You can update the numbers given by the xinput_calibration utility in the usr/share/X11/xorg.conf.d/01-input.conf file in order to have the best calibration at boot.
In the previous article, I described the steps needed to install an LCD touchscreen on the Raspberry Pi. In this article, I will show you how to adjust the screen rotation of the LCD to landscape mode, and will show you how to calibrate the touchscreen pointer for optimal accuracy. Just follow the steps below to compete the process of setting up your Raspberry Pi LCD touchscreen:
1. First we need to change the setting for screen rotation in the /boot/cmdline.txt file. This setting is called fbtft_device.rotate=X. By default, this is set to X=0, which results in a portrait mode screen orientation. In order to switch the orientation to landscape mode, change fbtft_device.rotate=0 to fbtft_device.rotate=90. Enter sudo nano /boot/cmdline.txt at the command prompt. There should only be one line in this file. Go to the end of it and you will find the fbtft_device.rotate=X setting. Change the value from 0 to 90:
However, if you try to touch the screen now, you will find that the pointer movement does not correspond to your finger movement. This is because the LCD screen driver and the touchscreen controller driver have separate settings for screen rotation. We need to change the rotation of the touchscreen controller driver to match the rotation of the LCD screen driver.
2. You probably noticed that dragging your finger to the right moves the pointer up, not to the right. This indicates that the x and y axes of the touchscreen are swapped. To correct this, we need to swap the x axis for the y axis. This can be done by changing the swap_xy=X parameter in /etc/modules.
Now if you drag your finger around the screen, you will notice that the y axis (up and down) is correctly aligned with the motion of your finger. However, the x axis (left and right) is still inverted. To fix this, we need to install two more kernel modules, xinput and evtest. xinput is a Linux utility that will allow us to configure input device settings for the touchscreen controller, and evtest is an input device event monitor and query tool.
After the Pi finishes rebooting, you should notice that when you move your finger across the touch screen, the pointer should follow correctly in both axes. If you are using the Raspberry Pi 2 Model B, you will need to complete the calibration steps below before the pointer follows your finger correctly (and make sure that you have enabled startx to load automatically – see step 6 in this article).
You can rotate the screen 90 degrees (as we did in this tutorial) and the power connector will be at the bottom of the screen, but you can also rotate it 270 degrees so that the power connector is at the top of the screen. To do this, simply enter fbtft_device.rotate=270 in the /boot/cmdline.txt file. Then change the DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 0 1 line in the /etc/X11/xinit/xinitrc file to DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 1 0. All you need to do is switch the values of the 0 and 1 at the end of this line.
Now that we have our LCD touchscreen up and running, the final step in the installation is the calibration of touch control. This will make the pointer much more accurate and easier to use.
2. Now we need to install the calibration tool we will be using, xinput_calibrator; and other filters for controlling the touchscreen response. Install the tslib library by entering aptitude install libts-bin:
4. Now we can use ts_calibrate. Enter ts_calibrate at the command prompt (make sure you are still in root mode) to run the ts_calibrate program. The program will consecutively display five crosses on different parts of the screen, which you need to touch with as much precision as possible:
Drag the cross around the screen and observe how closely it follows your finger or stylus to test the accuracy of the calibration. Now press the “Draw” button to enter the drawing mode:
This is kind of a long process, but it is well worth it if you want to get the LCD touchscreen set up properly. So if you have any trouble setting this up or have anything to say, please leave a comment below. Also, if you found this article useful, please share it with your friends!
I already heard of ITEAD, not about this Nextion.. It seens it leaves alot of the processing for the Arduino, I don"t know if I"m ready to do it all...
No, seriously!! The Mega is brilliant at what it does, but if you buy a DUE after you buy a MEGA, you will wish you got the DUE sooner, and your Mega will start gathering dust............. the difference is THAT dramatic! If you are tempted to go down the SPI display route, you DEFINITELY want a DUE, not a Mega! Simple reason being, the SPI speed of the Mega is 4Mhz? You can squeeze 42Mhz out of the DUE SPI, AND you can drive it via DMA, the Mega has no DMA.
Isn"t exactly mandatory, but I would like to have a big screen, I plan to hang it on the wall right on my bed, to use as an alarm clock / weather checking station, and as I already use, with voice recognition and as a webserver to control my house automation (ligths, TV"s, HT"s, etc.).
And about the standard UTFT devices, I didn"t find any 7" inch, and the processing is left all for the Arduino right? I don"t know if I"m ready to the task, the screens I want to make are not that hard if it"s done graphically, but it"s alot harder if done by coding, my HTML code as almost 250 lines for it...
Hi to all, I"m a new user, I have a Raspberry Model B and I bought a 7 Inch Capacitive Touch Screen LCD(C) 1024x600 HDMI (Makibes). This TouchScreen is connected to the Raspberry through an HDMI and a USB cables.
Basically, my problem is that: when I power on the backlight switch on the TouchScreen, the Raspberry stops (activity leds also stop) and the Raspberry freezes in few minutes. This occurs just when I power on the backlight on the LCD (and obviously I need it to use the LCD). If I let the backlight down, then it keeps regularly working.
The only way to use it seems to be using a separate power supply for the LCD, but I couldn"t connect it via USB to the Raspberry, so I couldn"t use the touch function: it acts just like a monitor.
PS - about a powered HUB, I was already planning to use one, but I still miss this thing... (once I tried a passive HUB, not solving the problem, so of course I"ll try the powered one...)
It appears that you are unable to get enough current into the RPi to power the RPi and the USB powered screen. That could be because your power supply is too weak and/or because the polyfuse on the micro-USB power input is tripping. A beefier PSU can overcome the former but not the latter. A powered USB hub is an easy solution to the latter. More difficult would be to connect an adequate PSU to the 5 volt power pins on the GPIO header. But that runs the risk of damaging (even fatally) the RPi if you get the connections wrong.
i asked which model of RPi because the B+, 2B and 3B are able to supply substantially more current to the USB ports than the earlier models. The lack of polyfuses on the USB ports of your B is not the problem.
Today I was able to try with another bigger PSU (2,4 A), but nothing new happened. I will try a 3 A in the next days but I don"t think it will solve anything.
The only thing I have to be careful is to avoid powering off the HUB, because the Raspberry get freezed, or doesn"t recognize the touch functionalities of the LCD.
Basically I found other two RPI (same revision of mine: 2708), and I saw that they work flawlessly with the LCD monitor, without the problems that I"m experiencing... The only difference is that the board of my RPI is made in China, while my friends have RPIs made in UK
We"ve all been there. Tapping, swiping or zoom-pinching, there"s often a moment when the touchscreen display on your tablet refuses to respond. How do you overcome this, and achieve tablet-tapping Zen?
As the primary mode of interaction between you and your apps, the tablet touchscreen is vitally important. Any damage inflicted – knocks to the device, scratches or worse – will degrade the touchscreen. Short of paying for a replacement, you will need to make sure the display is kept safe and intact.
The following tips – also suitable for smartphones – will help you resolve your tablet"s touchscreen responsiveness issues. We"ve designed this guide for all touchscreen tablet computers. So, if your Android tablet touchscreen is not working, or your device uses iOS, or Windows, the answers you need are right here.
Perhaps the best place to start in troubleshooting screen responsiveness issues is to make more system RAM available. This may take a moment but should give you an idea of how bad the problem is.
If your Microsoft Surface touchscreen is not working, or you use a different Windows 10 tablet, close as many desktop apps as is practical can before switching to the Start screen. Then:
Restarting a tablet isn"t a case of just tapping the power button to turn the screen off. Instead, the whole device must be switched off and back on again.
After all, how do you fix an unresponsive touchscreen when most of your options are accessible through the screen? The answer is surprisingly simple: connect a mouse.
Knowing which area(s) of the touchscreen are failing to respond correctly can be useful in diagnosing what is wrong. This information would prove useful to any engineer who ends up repairing the tablet.
On Android, free calibration and testing apps are available. Touch Screen Test is a good app that helps you find specific areas where input is not detected.
For devices that are in warranty, this means contacting the manufacturer and arranging a return, or dropping into a store. iPads, for example, can be taken to Apple Stores; Samsung tablets can similarly be taken to Samsung stores. In some cases, doorstep repairs are possible, where the device is repaired in a mobile Samsung-approved workshop parked outside your home. If your Samsung tablet touchscreen is not working, this fast-repair option might be available.
Whether you"re using a Samsung, LG, iPad, or your Lenovo tablet touch screen is not working, check your device manufacturer"s support pages to find the correct steps to arrange repair. Make it clear what steps you have attempted to resolve the touchscreen issues.
As noted above, if your tablet screen is cracked, it can impact touch reliability. Whether big or small, a cracked tablet screen will always fail eventually. Having your tablet looked at by an engineer under warranty is the smart option but isn"t always possible. If your tablet is out of warranty and the screen is cracked, you have two options:
Wondering how to repair a tablet touch screen yourself? For cheaper tablet models repair makes more sense than with premium brands. So, if you have a Vankyo, Onn, Yosatoo, Contixo, or Amazon Fire tablet with a screen that is not working or responding to touch, consider replacing the display yourself. Our guide to replacing a cracked Amazon Fire tablet display will help here.
Most problems can be avoided with care, a screen protector, and a case for your tablet. But where possible, avoid water and don"t get your tablet wet.
When working with Raspberry Pi, you should set the resolution of the LCD by yourself, otherwise, the LCD screen will not work. For more detailed information, please read the following section.
When the Raspberry Pi is connected to multiple monitors at the same time, the touch effect of the 7inch LCD will be applied to the main screen by default. If you need to specify the touch to the secondary screen, see#Calibrate double-touchscreen in Pi 4
On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.
2. Input command xinput in the terminal, and check the touch ID of the main monitor. (There should be two IDs, you can touch displays to check which is the main one);
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.
Next we need to define the fonts that are coming with the libraries and also define some variables needed for the program. In the setup section we need to initiate the screen and the touch, define the pin modes for the connected sensor, the led and the button, and initially call the drawHomeSreen() custom function, which will draw the home screen of the program.
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.
Next is the distance sensor button. First we need to set the color and then using the fillRoundRect() function we will draw the rounded rectangle. Then we will set the color back to white and using the drawRoundRect() function we will draw another rounded rectangle on top of the previous one, but this one will be without a fill so the overall appearance of the button looks like it has a frame. On top of the button we will print the text using the big font and the same background color as the fill of the button. The same procedure goes for the two other buttons.
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.
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.