Xojo + Raspberry Pi = Car-puter!

Hi everyone!

I’m a brand-new Xojo user! Just got Xojo about 2 weeks ago. I was a VB programmer for many years and Xojo seems very similar to VB (but a lot more capable). I’m excited to be able to develop applications for the Raspberry Pi.

I’m working on a project that will end up being installed in my classic 1988 Corvette. If you’re interested, here’s a link to the discussion thread on the Corvette enthusiast board I frequent:

http://www.corvetteforum.com/forums/c4-general-discussion/3935018-any-interest-in-a-1-5-din-car-computer-for-84-89-vettes.html

http://www.corvetteforum.com/forums/c4-tech-performance/3935566-1984-1989-1-5-din-car-computer-project.html

I just posted a video clip that shows the beta version of the Xojo application I’m developing:

https://youtu.be/CO5RwiTbiPQ

Anyone else using Xojo for car-puter type projects?

-Wes

Hello Wes,

nice project!

How do you integrate the OMXPlayer?

Volkmar

Hi Volkmar,

Integrating OMXPlayer into a Xojo application is really just creating the illusion of integration. In general terms this how I do it:

  1. I use an “asynchronous” shell to launch the OMXPlayer and wait for the ‘Completed’ event to let me know when the player is finished playing music or video.

  2. I use a “synchronous” shell to issue D-BUS commands to the OMXPlayer. Once the OMXPlayer is launched, I immediately start polling the OMXPlayer in a loop until I get a valid response. This tells me that the OMXPlayer is up and running and is ready to accept commands.

  3. I continue to use a “synchronous” shell whenever needed to issue D-BUS commands to the OMXPlayer such as: pause, resume, stop, seek, change video size and position etc.

I created a Xojo class that encapsulates the nitty-gritty details of controlling the the OMXPlayer and maintaining state information.

As for the visual integration of OMXPlayer into a Xojo application, that really is just an illusion. I leave a blank area with a black background in my Xojo application and I position and size the OMXPlayer video output to fit within that blank area. My application now looks like it is generating the video. It’s an illusion but it’s also a convincing one.

-Wes

Hello Wes,

What are you using for Navigation and Diagnostic ? i wanted to do same on my vw and to have something personalised, as well what are you using on the amplifier part ? something that you can control via the pi or not ?

Thanks,

Aurelian

Hi Wes,

thanks for the detailed description.

Raspberry programming with Xojo is an adventure.

I’m trying Multitouch. A lot of work.

Volkmar

[quote=321618:@Aurelian Negrea]Hello Wes,

What are you using for Navigation and Diagnostic ? i wanted to do same on my vw and to have something personalised, as well what are you using on the amplifier part ? something that you can control via the pi or not ?

Thanks,

Aurelian[/quote]

Hi Aurelian,

I haven’t tackled the Navigation and Diagnostic parts yet.

I’ve seen some open source navigation software (the name escapes me) and will probably use that if can.

I’m targeting a specific car (Chevrolet Corvette) and a specific generation (1984-1989) which use the old General Motors OBD-1 protocol. I’m planning to roll-my-own solution for this. I’ve purchased the necessary OBD-1 to USB cable and have researched the data produced by the OBD-1 protocol. Hopefully I can get something up and running on the Raspberry Pi with Xojo. I’ll report back as I start working on this part of the project.

The amplifiers are built into the speaker housings on the Corvette, so I’m not going to need amplifiers. Just the line-out signal. At least that is my current assumption. If I have to employ my own amplifiers, there’s a lot to choose from at MCM Electronics.

-Wes

[quote=321644:@Volkmar Polkowski]Hi Wes,

thanks for the detailed description.

Raspberry programming with Xojo is an adventure.

I’m trying Multitouch. A lot of work.

Volkmar[/quote]

Hi Volkmar,

Luckily my project doesn’t need something as sophisticated as Multi-touch. The touch-screen I’m using (from Adafruit.com) doesn’t support multi-touch. I just need simple touch-screen push-buttons. Multi-touch would be much to ‘fiddly’ for an in-dash entertainment system. I’ve got to keep is easy to use while driving.

-Wes

Hello Wes, its possible to get your OMX class? I need this for a museum info kiosk system … thanks.

Frank from Berlin

mail: info@qualidat.com

Like Frank, I need a similar OMX class for a kiosk system for a Medical Clinic. It would be very usefull if you could share it in the forum. Thanks

Corvettes already have an entertainment system = the Throttle body and the exhaust. Anything else is just driver distraction!

Tim Jones
1981C3 Red on Red 4 Speed
Factory 8-Track and CB Radio

This Sunday I have made my own solution because I do not have much time to wait. Quick & dirty, but it works for what I need. I need that for a museum.
I will share the solution here, but I hope, we will find someone who will do it better. I use “xdotool” to simulate keystrokes, this must be installed first.The link to my project is: www.qualidat.com/material/wnk-video.zip.

Everything must be in the folder “/home/pi/Documents”, also the mp4 videos and a text file “titel.txt”, which contains the file names and a short description for the listbox in front. An example is inside, but videofiles are not there - you can use your own.

While it’s awkward to change anything on the Raspberry when the application is running on autostart, there is a socket. With a browser you can shoot down the application. Use the URL http: // ip-address: 8080 /? !!! and the program ends.

Translated with Google Translate

Thanks Frank !!!

@frank esselbach I just started fiddling with OMXPlayer and Xojo. Is your OMXPlayer class still available? The link in your 2018-12-09 post is dead.

Thanks!

I think Wes changed his website URL. Try this:
https://www.comvette.com/software.php

Thanks @Robert Weaver I got the code.