RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 3
Goto page 1, 2, 3  Next
Raspberry Pi support - enables a hard-wired, dedicated dash
Author Message
Reply with quote
Post Raspberry Pi support - enables a hard-wired, dedicated dash 
Hello,

We've added support for Raspberry Pi - check out the announcement here:
https://www.autosportlabs.com/create-a-dedicated-dash-for-your-racecapture-for-about-100/

Fully documented here: https://wiki.autosportlabs.com/RaceCapture_on_Raspberry_Pi

Let us know if you get this working, would be great to see!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Anyway to get this to work along with using a USB battery backup so you don't lose power during a pit stop during a race when a kill switch must be used?

View user's profile Send private message
Reply with quote
Post  
Quite possibly! This is more of a Raspberry Pi topic, so I'd crack the knuckles and warm up the googles - if you find anything good please post it here! Smile


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
There are USB battery packs that feature pass through charging. The problem is that most of them only support ~1.2A output while the battery pack is on power (~2.4A when only on battery). I'm continuing to look for a unit that can provide 2-2.5A while charging in passthrough mode.

Assuming I find one, I will use a hardware 12V to micro-USB adapter (can be found on Amazon from seller Spy-Tech, 5V 3A). This will plug into the battery pack. Then the batter pack will plug into the RPi. Then then of course the USB from the RPi will plug into the RCP. Because the RCP is plugged into the RPi, the RCP will stay powered from the RPi even when 12V is removed from the RCP.

-bj

View user's profile Send private message
Reply with quote
Post  
This could be a clean solution, though I'm not sure when or if they'll be able to deliver:

https://www.pi-supply.com/product/pijuice-standard/

View user's profile Send private message
Reply with quote
Post  
ok, here my write up:

I got my raspberry Pi3B a couple of days ago along with the official 7" display and the case for both. Looks useful but when I install it in the car I was wondering why the screen is flipped upside down. Now that I read a bit, they do it intentionally to increase the viewing angle. So you have to mount the case upside down. This is ok and works as good.
I installed the standard rasbian OS with the Noobs installer. It is not just called this way: "noobs", it is really for people like me who never worked with any Pi.

Then I had to change some configurations. The first and most important one is the screensaver. I found 100 tutorials about how to turn it off, no success. Then I found the noob-way:
Type thin into your Terminal:
Code:
sudo apt-get install xscreensaver

Then you get a nice config tool installed where you can turn all energy saving/screensaver stuff off.

The next thing was to enable a push-button for left/right key to flip the pages in the app. I did not want to hack a keyboard etc, I just wanted to use the GPIO on the Pi. So I needed a Deamon which runs in the background to emulate a keyboard. No problem if you know how to:

pikeyd is a c program which translates the GPIO HI/LOW to keyboard presses.

Code:
sudo git clone https://github.com/mmoller2k/pikeyd.git
cd pikeyd
sudo nano joy_RPi.c

If you use a Pi3, you must change one #define before you continue. The line is called
#define GPIO_PERI_BASE 0x20000000
change the number into 0x3f000000
After saving the file, go on with:
Code:

sudo make
sudo modprobe uinput
sudo cp pikeyd /usr/local/bin/pikeyd


pikeyd needs a config file to map the key presses to GPIO pins
Code:
sudo nano /etc/pikeyd.conf


and paste the following code and save

Code:

# {all keycodes can be found in /usr/include/linux/input.h} {GPIO pin no}
# The numbers are the GPIO numbers. It is not the Pin on the header!! This drove me nuts!

KEY_LEFT 2 #Pin03 on Header
KEY_RIGHT 4 #Pin07 on Header

KEY_ESC 14 #not used in my setup.


Now, lets make sure pikeyd start when we boot up

Code:
sudo nano /etc/rc.local


Add the following line before exit 0
Code:
/usr/local/bin/pikeyd -d


Save the file.
Now we want to launch the uinput module every time we boot up automatically:
Code:
sudo nano /etc/modules


Scroll to the bottom of the file and add:
Code:
uinput

Save the file.

The thing is, that every button requires a pull-up resistor on the Pi GPIO unless you switch on the internal pull-ups. I have done that and I will explain you how in the following description.
I wanted to run the Pi with an external power pack. To be able to turn it on and off, I needed to add a button on the GPIO which runs a script. The best one I found was this here.
Code:
sudo git clone https://github.com/gilyes/pi-shutdown.git
nano pi-shutdown/pishutdown.py

Here I wanted to come back on the pull-up resistors. Now, in the file add below the line "shutdownPin =5"
Code:

leftPin = 3 #GPIO2
rightPin = 7 #GPIO4
escPin = 8 #GPIO14

then go down in the file and find the line "GPIO.setup(shutdownPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)"
add below:
Code:

GPIO.setup(shutdownPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) #already existing
GPIO.setup(leftPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(rightPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(escPin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

save the file and copy it to the opt location.
Code:
sudo cp pi-shutdown/pishutdown.py /opt/pishutdown.py


Now we want to run the script as a service in the background. To do this create a file called pishutdown.service in /etc/systemd/system/:

Code:
sudo nano /etc/systemd/system/pishutdown.service

fill the file with:
Code:

[Service]
ExecStart=/usr/bin/python /opt/pishutdown.py
WorkingDirectory=/opt/
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=pishutdown
User=root
Group=root

[Install]
WantedBy=multi-user.target

Enable service:

Code:
sudo systemctl enable pishutdown.service


Run service (will be automatically started on next reboot):
Code:
sudo systemctl start pishutdown.service

I got an error message here but after the restart the script was running. You can now reboot by connecting pin 5 to ground for less than 3 seconds. if you push for longer than three seconds, the Pi will turn off. If you stay with pin 5 you can wake up th Pi by pressing the button again after shutdown. This will work on this pin only.

grounding Pin 3 will be as if you press keyboard left, Pin 7 is for keyboard right. This will be on my steering wheel to change pages. ESC is mapped to Pin 8 but I think I will not use it.

This is it for now.

View user's profile Send private message Visit poster's website
Reply with quote
Post  
This looked really cool and just what I need.
I got the raspberrypi and display and 12v-5v 3A powersupply.
Went through the installation instructions. Kind of convoluted since it is follow this link, do that, then follow this link etc... Felt more like a scavenger hunt. Confused But all in all it went ok until....
Apparently the multi touch tools didn't load correctly (didn't have anyway to test it since I was still waiting for the 3A power supply to arrive and the car adapter I was using wouldn't run both the Pi and the display simulataneously). Then I loaded the the app and edited the boot file to launch the RC app automatically.
The app comes up automatically on startup, great! But the touch screen doesn't work so I can't do anything with it or even exit the app to try and reload the multi touch tools. Is there a keyboard command that will close the app? Or one that will prevent the app from loading at boot? Looks like a jumped the gun when I edited the boot file and now I'm stuck. Any help would appreciated... Brent????

View user's profile Send private message
Reply with quote
Post  
Yes, indeed - that's why we emphasized the experimental nature and some advanced skill needed. It's definitely not plug and play!

Regarding the touch screen, you might want to double check the RPi documentation and use those tools and guides to verify the touch screen works as expected - you could try loading up the RPi full disk image on a secondary SD card and launch the windowing system to verify touch works, as well.

Let us know what you find out!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
As you suggested I loaded the full RPi image (with Noobs) on a second SD card. The touchscreen works as intended. So I know the hardware if functioning.
Then switched back to the other SD card (with Jessie Lite), boot up and start racecapture. No response from the touchscreen.
So then I started over. Wiped the SD card and went through the entire process again. Again no response from the touchscreen. It also does not respond the arrow keys or a mouse. Esc will take it to the home screen. No other keys seem to do anything.

View user's profile Send private message
Reply with quote
Post  
wizrd54 wrote:
Anyway to get this to work along with using a USB battery backup so you don't lose power during a pit stop during a race when a kill switch must be used?


I plan on supplying power from a circuit that stays live when the ignition is off. It will only power off when the emergency kill switch is turned off and all power to the car is cut.

View user's profile Send private message
Reply with quote
Post  
Not sure why that's happening. Anyone else seeing the same problem?

We released two RPi app images so far; you might want to try the original image on a fresh OS build and see if that changes anything.


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
thokes82, can you answer something for me. does the pi3 GUI use a different conf file when running the racecapture app? I am using a Pi3 w/10.1 resitive touch waveshare screen (GPIO). touchscreen works fine with GUI (PIXEL LITE). but when I launch RC app, the touchscreen inputs appear swapped and inverted.

editing the /etc/usr/X11/xorg.conf.d/99-calibration.conf only seems to effect the GUI.

great write up on the GPIO inputs, if I can get this screen to work I plan on using them. Dave

View user's profile Send private message
Reply with quote
Post  
Brent, still trying to get my 10.1" Waveshare LCD working correctly with PI3 and the RC app. I spoke with the vendor and this was their reply:

"The .sh file is most likely a shell script. Those are typically used to setup environment variables and related settings before running the actual software (which seems to be "racecapture", located in the root of the archive).

It is very possible that the libraries used by the software to produce a GUI do not support the touch screen properly or skip it as an input device. The best would be to contact the company that makes this software for support.

As you already confirmed, the touch component of your touchscreen is working well with the RPi GUI, so this assures us it is working well at this moment."


I realize this isn't your problem, but if you could give me some input/direction I would appreciate it. I like this unit as i't's compact in form, large screen and resistive touch. thanks, Dave

View user's profile Send private message
Reply with quote
Post  
Hi,

It's entirely probable you'll be able to get this touchscreen to work, with some effort.

The app is based on the Kivy framework. The key here is configuring the settings for touch / mouse. See near the bottom of the Kivy project's raspberry Pi how-to:
https://kivy.org/docs/installation/installation-rpi.html

It will be a matter of finding the right settings for your screen.

Take a look at the startup script we provide in the raspberry pi package; you'll see how we work to detect the correct screen and apply the correct config file. We support the official display and another touch screen controller that we're experimenting with.

Let us know what you find out!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
brentp wrote:
Not sure why that's happening. Anyone else seeing the same problem?

We released two RPi app images so far; you might want to try the original image on a fresh OS build and see if that changes anything.


Success!! Loading the archived version of Racecapture (1.10.2) on a fresh OS build (Jessie Lite) worked.

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 3
Goto page 1, 2, 3  Next
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum