Raspberry Pi support - enables a hard-wired, dedicated dash

Discussion on the RaceCapture App - Windows, Android, OSX and Linux.

Moderators: JeffC, stieg

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Which thing are you seeing exactly? Is it working properly with the official RPi display?
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

ppressle
Posts: 12
Joined: Sat Mar 10, 2018 8:59 pm

SunFounder 10.1" capacitive touch screen success

Post by ppressle »

I am building a display with a SunFounder 10.1" capacitive touch screen. On the initial install, the touch screen was not responsive.

I found Joe D's comments about the settings for this screen and made his changes for config.ini and am happy to report that the touch screen is now responding. Thanks to Joe D. for his info on this screen and you guys for this really nice option.

Now to get rid of the touch circle, and make sure the screen saver never kicks on and then to build a case.

Pete

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Awesome. Thanks for the update!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

PS14
Posts: 97
Joined: Fri Feb 12, 2016 11:27 pm
Location: NY

RPI UPS FOLLOW-UP

Post by PS14 »

Just thought id follow up on my Rpi under voltage issues while cranking the starter. I purchased the UPS PICO 450 stack plus hat, which allows a 12v power feed and automatic switching to back up battery. I ordered it from MODMYPI overseas, and didn't know if you contact them in advance they can swap the stock 450mah battery for one of the larger ones (customs issue). so I got a 3cell series 18650 batt holder and three 3300mah e-cig batteries to work as the battery backup supply (ttl 9900mah). the PICO requires a little soldering, but not to terrible. after install it works very well. what's really nice is you can simply turn the batt master off and after 60seconds the PICO initiates a safe PI shutdown. then shuts itself off. when the car is running on 12v it will also charge the back up batteries. what I don't like is you cant see the status led's to tell if everything is functioning.

I also since found you can get the PICO in the US at http://www.sfo-takumi.com/shop/

clifton23
Posts: 2
Joined: Tue Apr 10, 2018 6:59 pm

Re: RPI UPS FOLLOW-UP

Post by clifton23 »

PS14 wrote:Just thought id follow up on my Rpi under voltage issues while cranking the starter. I purchased the UPS PICO 450 stack plus hat, which allows a 12v power feed and automatic switching to back up battery. I ordered it from MODMYPI overseas, and didn't know if you contact them in advance they can swap the stock 450mah battery for one of the larger ones (customs issue). so I got a 3cell series 18650 batt holder and three 3300mah e-cig batteries to work as the battery backup supply (ttl 9900mah). the PICO requires a little soldering, but not to terrible. after install it works very well. what's really nice is you can simply turn the batt master off and after 60seconds the PICO initiates a safe PI shutdown. then shuts itself off. when the car is running on 12v it will also charge the back up batteries. what I don't like is you cant see the status led's to tell if everything is functioning.

I also since found you can get the PICO in the US at http://www.sfo-takumi.com/shop/
With this setup, is there a way to disable the 60 second safety shutdown?

PS14
Posts: 97
Joined: Fri Feb 12, 2016 11:27 pm
Location: NY

Post by PS14 »

yes, from the manual:
On Battery Powering Running Time when cable power loses or not exist. After that time a File Safe Shut Down Procedure will be executed and System will be shut downed without restart. Battery power will be disconnected. System is in sleep mode (LPR) and RTC is running. If Raspberry Pi cable power returns again system will be start automatically. If during the sleep mode (LPR) the F button will be pressed for longer time than 2 seconds (with battery or cable powering) Raspberry Pi will re-start again. Value of 0xff (255) disable this timer, and system will be running on battery powering until battery discharge to 3.4V for LP battery and 2.8V fro LF Battery type. Factory default value is 70 seconds Each number stands for 1 minute of Battery Running. Default Value is 0, and the highest Value is 0xFE. If user will enter i.e. 2, the Battery Running time will be 60 seconds + 2 x 60 seconds = 180 seconds. After that time system will be shutdown. If user after that will press again F button system will restart and run for 180 seconds again and then shutdown. Read: Anytime, Return actual fssd_timeout value Write: 0x00 – 0xFF Any change on this register will cause immediate writing of the new value to the PIco EEPROM

https://drive.google.com/file/d/1GT3Q0W ... ixBxI/view

ppressle
Posts: 12
Joined: Sat Mar 10, 2018 8:59 pm

RaceCapture autostart on RPi?

Post by ppressle »

I am trying to get the auto start of RaceCapture to work, but to not restart automatically if I close it.
I did the recommended setting in rc.local of

Code: Select all

 /opt/racecapture/boot_racecapture.sh pi
and it starts racecapture, but if I close racecapture another is started automatically.

I am not using the watchdog setting. Why it is doing this? Is there any way to prevent it?
What does the pi parameter do? I don't see that referenced in the script.

If I comment out the

Code: Select all

if [[$WATCHDOG -ne 1 ]]; then
and fi lines in run_racecapture, racecapture does not auto restart so something about that test is not working properly.

Thanks
Pete
Last edited by ppressle on Mon Sep 17, 2018 2:35 am, edited 1 time in total.

PS14
Posts: 97
Joined: Fri Feb 12, 2016 11:27 pm
Location: NY

Post by PS14 »

Dont know why it does it, but you can type (while racecapture is running) "killall 9 run_racecapture.sh -w 1", then exit racecapture, and when you get the terminal the text should be entered so just press enter. you made need to exit racecapture twice (then just use the up arrow to see last line entered (the killall command) and press enter. that will stop the script untill the next reboot. i usually hashtag out the line in rc.local if i'm doing some pi software work. and remove it when i'm done updating or whatever. Dave

ppressle
Posts: 12
Joined: Sat Mar 10, 2018 8:59 pm

RPi connectivity to mifi

Post by ppressle »

A quick note for RPi users, not RaceCapture specific, but which might be helpful.

The RPi connects to my Verizon mifi ONLY in 5 GHz. So if you set the mifi to use 5 GHz instead of the 2.4GHz you might have better luck.

Worked for me.
Pete

mikesmith
Posts: 21
Joined: Wed May 24, 2017 5:31 am

Re: Inverting HID mouse input?

Post by mikesmith »

mikesmith wrote:I've upgraded(?) to a Waveshare 10" cap-touch LCD which emulates a HID mouse. Everything seems to "just work" with the default Kivy config... except that the mouse Y direction is inverted.

I found out how to invert touchscreen X/Y axes, but so far have had no joy talking Kivy into inverting the mouse (and honestly, why should it? this should 'just work')

Any thoughts on a Linux or Kivy-level config that will let me flip the Y axis? It's a bit of a brain teaser but otherwise seems to work very well...
Finally got back to this; seems to be a Kivy bug. Adding ",invert_y=0' to the hidinput options fixes it. (Yes, that's a zero, not a 1).

smallspeed
Posts: 43
Joined: Mon Nov 30, 2015 1:08 pm
Location: Leicester, UK

Post by smallspeed »

I tried this app this weekend - I’m using the B+ raspberry pi, genuine 7” raspberry pi screen, and have installed per instructions, etc the latest stable release. I have tried the beta too but same result..
I have the screen attached by the display ribbon cable, and the 4 header cables for 12v, gnd and the two other inputs

The problem I’m having is similar to on the first page of this thread - the app loads fine but is completely unresponsive to everything except the escape button on a USB keyboard, which only works once to get from the initial set up screen to the main menu.

The touch screen works perfectly when not using the RaceCapture app, so I’m a bit stuck - I’m not mega computer savvy but can follow instructions. I’ve rotated my screen, have WiFi set up, etc so everything is how I’d want it, just need to get the touch screen working correctly

The resolution on page 1 seems to be to install the older version of the app (1.10.? ) but this seems an odd thing to do as others have presumably got this working?
If anyone has any pointers or things I can try I’d appreciate it - I’ve tried 3 or 4 completely fresh installs using beta and stable versions but always the same issue..

Should also add I don’t think I have a power issue - it’s being run from a pair of 2A usb power ports in the house. I tried doing this a couple of ways but no difference so think power wise I’m fine

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

What Pi distribution are you currently running? We have a number of people reporting success with the current beta.

Once you know the touchscreen driver is loaded per the instructions provided by the RPi official display, you can launch the racecapture app directly, instead of the wrapper shell script, You can inspect the command line output of the app to see if it complains about a mouse driver.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

smallspeed
Posts: 43
Joined: Mon Nov 30, 2015 1:08 pm
Location: Leicester, UK

Post by smallspeed »

brentp wrote:Hi,

What Pi distribution are you currently running? We have a number of people reporting success with the current beta.
Your latest as of right now - 1.13.1
Should I try 1.14.4 instead?
Once you know the touchscreen driver is loaded per the instructions provided by the RPi official display, you can launch the racecapture app directly, instead of the wrapper shell script, You can inspect the command line output of the app to see if it complains about a mouse driver.
I don’t understand much of that - when you say launch directly do you mean from typing /opt/racecapture/run_racecapture.sh
at the command line? Or by using the auto launch thing.. I tried the auto launch but it meant because it was unresponsive I had to basically unplug it to get out then I couldn’t do anything because I was stuck in the auto launch mode and I couldn’t exit the app once it started

How do I inspect the command line output? I can’t escape the app once it starts - I can hit ESC on a usb keyboard to go from the setup wizard launch screen to the main menu but after that it’s completely unresponsive to key presses or any touch.. isthere a way to log it and go back in after a power off to see what’s going on?

smallspeed
Posts: 43
Joined: Mon Nov 30, 2015 1:08 pm
Location: Leicester, UK

Post by smallspeed »

So I've tried a few different things - different versions of the RC App, etc. most recently installing the full desktop OS and launching from there. I still have the same issue as before, except when I have a mouse plugged in I can get the app to "work". By work I mean I can move the mouse around and the different picks light up and I can click into the sub menus, although I'm then stuck! ESC only works that very first time to get from the set-up screen (with the pic of the two cars and the "SETUP" and "SKIP" buttons) to the main menu (with the dash, analysis and settings pics). Once I've done that once, none of the keyboard functions seem to work (ESC, or any of the other shortcuts, including CTRL+Q to quit out of the app) and so I'm kind of stuck in the homescreen or in the submenu i click into..

The one thing I've managed to do now I'm running the full OS is get to the log file from the app, so wondered if someone can take a look at this and let me know where I'm going wrong?

Just to recap - I'm using the pi model 3 b+, official pi 7" touchscreen connected by the display ribbon cable and the GPIO connectors, and when I'm not trying to use the touchscreen I'm using a USB keyboard and mouse. I've gone with this set-up specifically as its the recommended hardware, and I'm following the installation instructions on the wiki page to the letter. The only thing I've not tried recently is launching with watchdog, I'm just launching it from the command line (most recently within the full desktop OS rather than the "lite" version) because when it doesn't work with watchdog running I'm a bit screwed - I have to format the sd card and start again..

Anyway, content of the log file is below - hopefully it means something to someone.. I'm guessing the issue is in the last bit which reads as follows..

Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 810, in __bootstrap_inner
File "threading.py", line 763, in run
File "kivy/input/providers/hidinput.py", line 685, in _thread_run
IOError: [Errno 19] No such device

..but I'm out of troubleshooting skills with Linux / Pi so I'm stuck :(
Appreciate any help - I'm guessing I'm either doing something really dumb or I'm missing something during the set-up


*********LOG FILE*********

[[1;32mINFO[0m ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_18-12-18_1.txt
[[1;32mINFO[0m ] [Kivy ] v1.10.1
[[1;32mINFO[0m ] [Python ] v2.7.9 (default, Sep 17 2016, 20:55:23)
[GCC 4.9.2]
[[1;32mINFO[0m ] [Factory ] 194 symbols loaded
[[1;32mINFO[0m ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[[1;32mINFO[0m ] [Window ] Provider: egl_rpi
[[1;32mINFO[0m ] [GL ] Using the "OpenGL ES 2" graphics system
[[1;32mINFO[0m ] [GL ] Backend used <gl>
[[1;32mINFO[0m ] [GL ] OpenGL version <OpenGL ES 2.0>
[[1;32mINFO[0m ] [GL ] OpenGL vendor <Broadcom>
[[1;32mINFO[0m ] [GL ] OpenGL renderer <VideoCore IV HW>
[[1;32mINFO[0m ] [GL ] OpenGL parsed version: 2, 0
[[1;32mINFO[0m ] [GL ] Shading version <OpenGL ES GLSL ES 1.00>
[[1;32mINFO[0m ] [GL ] Texture max size <2048>
[[1;32mINFO[0m ] [GL ] Texture max units <8>
[[1;32mINFO[0m ] [Window ] virtual keyboard not allowed, single mode, not docked
[[1;32mINFO[0m ] [Clipboard ] Provider: sdl2(['clipboard_xclip', 'clipboard_xsel', 'clipboard_dbusklipper', 'clipboard_gtk3'] ignored)
[[1;31mCRITICAL[0m] [Cutbuffer ] Unable to find any valuable Cutbuffer provider.
xclip - OSError: [Errno 2] No such file or directory
File "kivy/core/__init__.py", line 59, in core_select_lib
File "/tmp/pip-build-E6DuRj/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
File "kivy/core/clipboard/clipboard_xclip.py", line 17, in <module>
File "subprocess.py", line 710, in __init__
File "subprocess.py", line 1335, in _execute_child

xsel - OSError: [Errno 2] No such file or directory
File "kivy/core/__init__.py", line 59, in core_select_lib
File "/tmp/pip-build-E6DuRj/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
File "kivy/core/clipboard/clipboard_xsel.py", line 16, in <module>
File "subprocess.py", line 710, in __init__
File "subprocess.py", line 1335, in _execute_child

[[1;32mINFO[0m ] [Text ] Provider: sdl2
[[1;32mINFO[0m ] [UserPrefs ] Data Dir is: /home/pi/.config/racecapture
[[1;31mERROR[0m ] [Error loading preferences, using defaults. [Errno 2] No such file or directory] '/home/pi/.config/racecapture/prefs.json'
[[1;32mINFO[0m ] [AppConfig ] using user storage directory: /home/pi/.config/racecapture
[[1;32mINFO[0m ] [GL ] NPOT texture support is available
[[1;32mINFO[0m ] [ProbeSysfs ] device match: /dev/input/event1
[[1;32mINFO[0m ] [HIDInput ] Read event from </dev/input/event1>
[[1;32mINFO[0m ] [ProbeSysfs ] device match: /dev/input/event0
[[1;32mINFO[0m ] [HIDInput ] Read event from </dev/input/event0>
[[1;32mINFO[0m ] [Base ] Start application main loop
[[1;32mINFO[0m ] [HIDMotionEvent] using <Dell Dell USB Entry Keyboard>
[[1;32mINFO[0m ] [HIDMotionEvent] using <FT5406 memory based driver>
[[1;32mINFO[0m ] [HIDMotionEvent] <FT5406 memory based driver> range ABS X position is 0 - 800
[[1;32mINFO[0m ] [HIDMotionEvent] <FT5406 memory based driver> range ABS Y position is 0 - 480
[[1;32mINFO[0m ] [HIDMotionEvent] <FT5406 memory based driver> range position X is 0 - 800
[[1;32mINFO[0m ] [HIDMotionEvent] <FT5406 memory based driver> range position Y is 0 - 480
[[1;32mINFO[0m ] [RaceCaptureApp]Datastore Path:/home/pi/.config/racecapture/datastore.sq3
[[1;32mINFO[0m ] [RaceCaptureApp] initializing rc comms with, conn type: Serial
[[1;32mINFO[0m ] [RaceCaptureApp]initializing datastore...
[[1;32mINFO[0m ] [RCPAPI ] cmd_sequence_worker starting
[[1;32mINFO[0m ] [RCPAPI ] msg_rx_worker starting
[[1;32mINFO[0m ] [RCPAPI ] auto_detect_worker starting
[[1;32mINFO[0m ] [DataStore ] Applying db migrations: []
[[1;32mINFO[0m ] [DataStore ] db migrations complete
[[1;32mINFO[0m ] [RaceCaptureApp] Current presets loaded
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 810, in __bootstrap_inner
File "threading.py", line 763, in run
File "kivy/input/providers/hidinput.py", line 685, in _thread_run
IOError: [Errno 19] No such device

[[1;32mINFO[0m ] [RaceCaptureApp] Current tracks loaded

PS14
Posts: 97
Joined: Fri Feb 12, 2016 11:27 pm
Location: NY

Post by PS14 »

i'll try to help, but not an expert. I don't have the 7" official screen, but have run into a similar problem. try this first.

if you can get to a pi command line (with internet access connected) type:
sudo apt-get install xsel (that should install the xsel library)
then type:
sudo apt-get install xclip (that should install the xclip library)
then type:
sudo apt-get update (let it do its thing)
then type:
sudo apt-get dist-upgrade (let it do it's thing, you will have to answer "y" if it needs to install something)
reboot, see what happens.

for me to exit out off RCapp, I have to hold "cntrl" button and hit "c" twice. don't know why. also if you can get to a command line, type sudo nano /etc/rc.local to enter the rc.local file and place a "#" in front of the line to auto start RCapp. this will stop it from auto starting until you get it figured out.

I have formatted prob 9 SD cards in the last year and have found there's a certain order of things that seems to work best, when you get stretch lite installed, I always update, upgrade & dist-upgrade next. then add RCapp. Dave

Post Reply