Raspberry Pi GPIO

Hi,

First of all, huge thanks to the team. I’ve already bought premium and most of the skins just to express my gratitude.

As for the meat, I’m currently running my dash with Raspberry Pi, running Lineage OS.
My car is rather old, and OBD2 does not provide most of the data. I can read the RPM, Speed, battery charge, oil pressure, coolant temp etc, but can not read the blinkers and other lights, such as seat belt, hand break etc. Most annoyingly, I cant read the fuel level as well via OBD.

Hence, I’ve written some custom code, and soldered some custom hardware based on Arduino, and using RealDash-CAN protocol. There, I read the presence and absence of the voltage in the circuit with the Arduino GPIOs (lowering the voltage using a voltage divider). Then I’m sending that data as CAN messages to RealDash via serial (Bluetooth for now).

While this works as proof of concept, its not super efficient due to:
A) Arduino runs out of GPIOs rather quickly, since I’ve read tons of data.
B) Using Arduino just as a GPIO extension, since Raspberry Pi has its own set of GPIOs.

Any idea how to use Raspberry Pi GPIOs to send CAN messages to RealDash?

I am planning to use this as a way to use GPIO pins on Pi with Android
https://evmanic.com/monitoring-raspberry-pi-gpios-when-running-android/

So the question is, how we can (probably format CAN message as in Arduino) send the data to the APP itself?

This should work by using your background software as TCP/IP server and configure RealDash to use WiFi connection to devices own IP address.

Makes sense! Lets try that

A little off subject, but I am intrigued by your RasPi implementation. Can you put the RasPi in sleep mode? How are you triggering wake/sleep to keep the battery drain from eating up the battery?

Yes, you can, since it’s running android. But the current draw does not change much. Or so it seems. Could be also due to the constantly running fan. Need to check without it. I Will post an update. Currently its:
0.70A - regular
0.65A - sleep

such leakage currents in sleep mode not only on RASPB … but also on all other portable devices (I do not mean tablets and phones)
So I advise you to forget about the stupid idea of ​​sleep, and just properly organize the power supply of the device with thoughtful modes and power off.
My personal experience with this is 3 years. You can check, but the result will most likely be the same.

I understand, but I do not want wake up times >5 seconds when the car starts up.