Page 1 of 1
Raspberry Pi 3+ Touch Screen
Posted: Sun Feb 10, 2019 1:43 am
by Vbigdog
Raspberry PI 3B and Raspberry PI touch Screen display
Problem: the touch screen works correctly in the native OS, Browser etc. but the touch screen does not work when running Racecapture.
Also, after I launch /opt/racecapture/run_racecapture.sh the app launches as I would expect it would, finds/connects to the MK3 but keyboard and mouse don't work. I have to power down to get back to a command window.
Have run and re-run display commands from the install guide.
I'm new to Raspberry and my Unix/Linux is about 20 years old, so likely a novice mistake.
Thoughts on what I am missing?
Re: Raspberry Pi 3+ Touch Screen
Posted: Mon Feb 11, 2019 4:41 pm
by Magikben
I spent almost all day yesterday playing with RPi and RCP trying to get the touchscreen to behave properly. I have an RPi/RCP setup in the car now using the "official 7" display" and it is fine, but I wanted a smaller screen. I have a 5" screen with an ADS7846 controller. This is what I think is happening: When you install the drivers for your screen and touchpanel everything is fine. If you look at the config.ini called by the run_racecapture.sh script there is a routine that checks for the official display or an AR1100 controller and copies the right info for them into the config.ini. What I don't see is logic that handles when neither of them are present. As a result the config for touchscreen is taken over by the RCP rather than using the config for the right touch system. I might be wrong but I think that is what is happening. I wasn't able to make it work. If I used a regular mouse the app freezes so that isn't a solution.
Posted: Mon Feb 11, 2019 10:48 pm
by Vbigdog
I don't know (exactly) what fixed my problem, but here's what I did:
1. Started over, from scratch with a new image on a new 32G micro SD (I had originally used a 64G micro SD, and screwed around with exFAT vs. FAT, then fussed with trying to only format the first 32 of the 64 as Fat...well, you get the picture.
2. I installed Stretch Lite (instead of NOOB). So no Raspian desktop, only CLI.
3. Installed Rascapture Pro as normal
4. I added a second power supply: 1 power supply for the PI itself, and a separate power supply for the display.
Rebooted all working well as expect.
Not sure what I did to fix it, but one (or more) of the above did the trick. I ordered the "standard" 7" display from the Official Raspian site. Didn't check the libraries.
Posted: Mon Feb 11, 2019 10:50 pm
by PS14
open the .kivy/config.ini file in your pi and replace the Input stuff so it looks likes this:
[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput
%(name)s = probesysfs,provider=hidinput
should get you working correctly.
ADS7846 Touchscreen solution
Posted: Tue Feb 12, 2019 6:20 pm
by Magikben
SOLUTION: The suggestions above helped me track down the right answer. Now that I knew what I was looking for I was able to get the right INPUT string:
ADS7846 = hidinput,/dev/input/event2,invert_y=0
lsmod returns ads7846 as hwmon
Brent, hopefully this is useful for the autoconfig. The only issue I need to track down is that the cursor doesn't seem to reach all areas of the screen. It works in the regular Pi GUI, but not while in RCP.
Posted: Tue Feb 12, 2019 7:33 pm
by brentp
Thanks. Could you try updating the startup script and seeing if that works? If so, we can incorporate that into the build.
Raspberry PI 3+ Touchscreen; Stretch Lite
Posted: Fri Apr 05, 2019 2:46 pm
by Fowlerisnuts
Any update on this? I’m having the identical problem. Official PI Touchscreen connected to 3+; fresh Stretch Lite install with latest RaceCapture. Installed multi-touch tools and other config instructions (memory split, etc) from the Autosport Raspberry PI wiki. When RaceCapture runs, screen comes up beautifully, reads front the MK3, no input possible either from touchscreen or mouse/keyboard.
Raspberry Pi 3+ Touchscreen; Stretch Lite
Posted: Fri Apr 05, 2019 4:43 pm
by Fowlerisnuts
[update]
I've been through the logs and reviewed the run_capture script. The check for ft5406 in lsmod is happening properly and the .kivy config is copied into place. The Kivy logs have some complaints early in initialization about missing a proper cut buffer but otherwise look normal, without error messages. The Kivy config is as copied by the Run_ script; it has no [input] section.
Nothing out of the ordinary in the boot logs, other than some complains about the broadcom Ethernet.
Keyboard works fine before running racecapture.
Uname 4.14.79-v7+
Any ideas?
Posted: Fri Apr 05, 2019 4:51 pm
by brentp
Hi, we will double check with a fresh lite install, hopefully this weekend. Stand by. Thanks!
ADS7846 Touchscreen
Posted: Mon Apr 08, 2019 6:27 pm
by guntherS
I'm having the same problem with the 5" touchscreen. Y-axis is inverted.
What do I have to do to fix this issue?
(I'm a raspberry novice)
Posted: Sun Mar 15, 2020 2:55 am
by KammoMiata
Hi All,
First post. Just ran across this issue myself. The solution I found was was very similar to above with one extra step:
1) make a copy of the /opt/racecapture/ar1100_kivy_config.ini, and name it ads7846_kivy_config.ini
2) add the line posted by Magikben to the kivy config file, HOWEVER (see note below):
ADS7846 = hidinput,/dev/input/event2,invert_y=0
NOTE: you need to know which event your touchscreen is being listened to. To do this, send the command:
cat /proc/bus/input/devices
Look for "ADS7846 Touchscreen" and note the "Handlers" In my case it was not "event2" but "event4". Make sure your event is correct in step 2.
3) Edit /opt/racecapture/run_racecapture.sh and duplicate the "check for ft5406..." if..then block and change the search string to ads7846 and point to your new ads7846 config file.
This is the link that helped me find the correct event:
https://ozzmaker.com/programming-a-touc ... pberry-pi/
Thanks for all the help above. I would have been lost without it.
Posted: Sun Mar 15, 2020 5:10 am
by KammoMiata
One more note...
If you then find that your pointer wont go to the edges of the screen, you must
1) run the following calibration:
https://www.waveshare.com/wiki/5inch_HDMI_LCD
Option "calibration" gives the results in the format <xmin> <xmax> <ymin> <ymax>
2) Copy the calibration information to the Kivy config file:
/opt/racecapture/ads7846_kivy_config.ini file.
Mine input section now looks like this:
[input]
mouse = mouse
ads7846 = hidinput,/dev/input/event4,invert_y=0,min_abs_x=183,min_abs_y=259,max_abs_x=3937,max_abs_y=4012
I managed to piece this together from these three links:
https://groups.google.com/forum/#!msg/k ... E2dlj8gNAJ
https://stackoverflow.com/questions/497 ... en-on-kivy
https://kivy.org/doc/stable-1.11.0/api- ... ation.html
Posted: Mon Mar 23, 2020 12:52 am
by KammoMiata
After you go through this hassle, make sure you back up your microSD card. I learned the hard way while working on this on my bench. I accidentally corrupted my card and had to rebuild the solution. The good news is, it works.
Link to how to use Win32 Disk Imager for backup or cloning:
https://www.howtogeek.com/341944/how-to ... of-backup/
Re: Raspberry Pi 3+ Touch Screen
Posted: Sat Apr 24, 2021 11:54 pm
by justJack
I have done everything this forum says to do, but my touch screen is still not working in the RaceCapture app. Has there been any updates on this issue since the last post on this forum?
Re: Raspberry Pi 3+ Touch Screen
Posted: Fri May 14, 2021 12:57 pm
by murray
Are you sure that you are not missing any steps? All the steps are crucial as kindly described by the previous users above. If you need help I can help you in a convenient time next week. I have left my raspberry pi at my
property in Cyprus and I can help you when I return back.