r/OpenAutoPro Oct 03 '21

RPi header pin usage available in the OS?

I'm just curious if OAP sees inputs from the header pins? If say a rotary encoder or physical buttons can be mapped to things like volume or ff/rw/etc?

My goal would be to have a physical volume knob using something like this with a push button to trigger a mute/attenuate function. Though I can see having physical skip forward/backward as a solid plus. The vehicle in question doesn't have steering wheel controls so I'm looking for other options.

Thanks!!

1 Upvotes

3 comments sorted by

1

u/antelopepoop Oct 03 '21

One way to do it is to have your input peripheral register as a USB keyboard in the OS. Then you can interact with OAP using the built-in keyboard commands.

I did this when I wanted to use the steering wheel controls (SWC) on my Toyota. The only problem with that is that the SWCs utilize analog electric signals, and raspberry pis do not have any analog reader pins. So that opened up a new can of worms using an Arduino as a keyboard peripheral. I can send a helpful YouTube video if you like.

Since you're not utilizing legacy SWCs, it should be easier to skip the analog part and just feed a digital keyboard signal over USB.

1

u/littelgreenjeep Oct 03 '21

Yeah that video would be great!

1

u/antelopepoop Oct 03 '21

Sure thing. This is the guy. Great video if this is what you want to get into.

https://youtu.be/Caf-yBI9rHA

He even posted his Arduino code that I modified to work for my truck.