arpi2390
Apr 10th, 2017, 11:01
Hi everyone,
I haven't been too active on this forum, I just consume the information here so I thought I'd give back something to the community.
I've been driving a really lot the last couple of months, long trips outside the country (around Europe) and for navigation I've used a GPS that attaches to the windshield and my phone with Waze. Waze is really great so I've been switching more and more to my phone and I'm ditching the GPS slowly (still have to use it abroad because of roaming cost). The problem is that I don't like the idea of keeping my phone in the sun so I've mounted a holder to the HU and I keep it there but it's not really "in my face" down there and I do have to "give up" the phone a bit when I'm using it, it's not a major problem because it's connected to the HU via bluetooth and I can have calls.
While driving at night I like to have a sort of heads up display of the road in my field of view. Another minus with the phone is the smaller screen size.
My solution: OEM Volvo RTI screen which "runs" Android. Something that is a bit more complicated then it sounds...as I found out later...
A little heads up, I don't have a lot of experience in the field of electronics (next to nothing) and not a lot of knowledge in programming hardware components (a few PIC controller projects in uni a few years ago turning on LEDs :D ).
First step in the project was to get an RTI screen with the lift mechanism, which I got from a donor car from a local breaker.
Next steps were identifying the problems and solving them. First problem, the RTI screen...well it's a bit more complicated then your average desktop monitor... A few sleepless nights searching on the internet turned up some answers on what to use and how to turn on the screen. Second problem, finding something that runs Android (for Waze, Youtube and other apps) well enough to be used day to day, "the internets" helped me out here too. I'll detail below.
So here's the current setup:
https://lh6.googleusercontent.com/k0RMFRFRbRbT_-68SJFGE5sVhm6T9MxO_psAJwLvD_-_1WWPtLoLGKa6kcPcck5f2KRoGO6wQ306SGM=w1920-h1014-rw
As you can see there are 3 components in the setup, firts off the OEM RTI screen, there's an Arduino Mega controller (an open-source electronic platform, I'll explain it's use later on) currently I switched the Mega to an Arduino Nano and last but not least an Odroid running Android (a sort of Raspberry Pi - don't mistake it for a raspberry pie it's not the kind of thing that you eat - that runs Android really well).
A bit more in detail:
The RTI is connected to 12V, ground and 12 ACC. Currently it's running off of a 12V power supply which has 12V and ground, the power supply is connected to the connector on the right side (with 5 pins) which is normally blue, you need to connect 12V to PIN 1 (right most pin), ground goes to PIN 5 (left most pin) and ACC - which I understood to be live only when the engine is running - also takes 12V so I connected the 12V from the power supply to that too, ACC is PIN 3.
So as follows:
PIN 1 <- 12V
PIN 5 <- Ground
PIN 3 <- 12V
PIN 2 and PIN 4 is I guess a backup connection for 12V and ground I didn't connect them up (PIN 2 - 12V and PIN 4 - Ground).
The other connector is the more interesting one, the green one on the left side. This in my setup has 3 important pins, PIN 4, PIN 7 and PIN 10.
Green connector pins explaind:
PIN 4 - serial connection (this is the communication port, we'll use it to send commands to the RTI, it's a unidirectional communication, the RTI is always the receiver)
PIN 7 - ground (you need to ground this to your controller)
PIN 10 - composite video in (we'll send the video feed here, I'm using NTSC but PAL is available on this pin too)
The Arduino is used to start the RTI screen and lift the screen up, also it can control the brightness of the screen.
Connecting the Arduino to the RTI: The ground pin I think is self explanatory, you hook PIN 7 to a ground on the Arduino. This is easy because the Arduino has all of it's pins marked you just connect it to something marked GND and you are good. PIN 4 is the interesting one because this needs to send through serial commands so we will need to connect this up to a serial communication pin on the Arduino too, on the Arduino Mega you have a few transmission pins, the Arduino Nano has just one. It's again easy to find the serial communication pins on the Arduino because they are marked (on the Mega because there's more then one you also have a lable "Communication" where you'll find all the communication pins) we will need to transmit data so you should be looking for TX pins, for best practice I suggest using TX0 pin even on the Arduino Mega and you only have the single TX0 pin on the Nano. (I also used these so my code is compatible with PIN TX0).
So this is the setup for Arduino to RTI:
PIN GND on Arduino -> PIN 7 RTI
PIN TX0 on Arduino -> PIN 4 RTI
Those who have been paying close attention know that there's one component left. The Odroid which is running Android and will output from the CVSB pin (composite video, NTSC) to the RTI.
We have one pin free left from the 3 that we will use in our setup, PIN 10. We need to hook that up to the Odroids video output and we need to ground the Odroid to the whole setup. For ground I grounded the Odroid (there's a ground pin right next to the CVSB on the Odroid) to the Arduino but it can be grounded directly to the RTI too.
So as follows:
CVSB OUT on Odroid -> PIN 10 on RTI
Ground on Odroid -> Ground on Arduino (GND Arduino or any other ground in the setup, the whole RTI metal casing is ground)
Here's an image of the whole setup that I tried to explain in the above lengthy text (if you got lost in it):
https://lh5.googleusercontent.com/kfMmqfcTcMjbsF16MTAieKKhZeJbZTV03sRFApIh5ylGfErMCS n6Lx7y6NvolnsYDDFEx_-K90R3buI=w1920-h1014-rw
The Odroid outputs NTSC video and the RTI is set up to receive NTSC too. RGB can be used somehow too, but I haven't yet got to that. I've been working on this just the last weekend, this is the progress that I made.
Now, the more complicated bit (not that complicated) is programming the Arduino to fire everything up. If anyone has ever coded in C, C++ or any other derivative of these, or more complex programming languages you should be good to go. For the novices in programming I will be your tech support if needed.
The idea is that the RTI needs to receive the "stay alive" command continuously, the "stay alive" command is nothing more then telling the screen what video mode it needs to use, what brightness it should be on (this can be omitted but you still need to send a command instead) and another bit of data, currently not know what this is, I've searched around but didn't find anything on it but to run everything it's needed. Pure speculation on my part for the unknown bit is that it's a sort of end of line character so that the RTI knows that it can execute the command...this is just my thought, could be completely wrong.
I'm using the Arduino to send out these bits and bytes. A more detailed explanation of the 3 pair of bytes we need to send to the RTI:
RTI screen mode: There are several screen modes the RTI can operate on, as follows RGB, NTSC, PAL. Also the first pair of byte controls the on/off of the screen, if you send out either the RGB, NTSC, PAL command the screen will turn on, if you send out the OFF command it will shut down and retract.
The pair of bytes in HEX value for the screen mode: RGB = 0x40; PAL = 0x45; NTSC = 0x4C; Screen off = 0x46;
Screen brightness: There are 16 values for the screen brightness, here are the HEX values from 1 to 16 -> 0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F
The unknown data (probably pair of byte to start executing the command): 0x83 - this needs to be sent out last
Example of turning on the screen with NTSC mode, full brightness: 0x4C 0x2F 0x83 (explination: NTSC | BRIGHTNESS | "Execute Command") - if you want the screen to stay up you need to continuously send this data out, I'm sending it out every 100 ms (added a delay of 100 ms).
A video of my first try:
https://www.youtube.com/watch?v=AuOx__sRwuQ
In the above video I'm using the Arduino Mega but I switched it out with the Nano later on. Also there was a problem with the screen, the electric motor kept running even after the screen went up or down, that turned out to be a connector that was not plugged in to it's socket inside the RTI, that's what you get when you take it apart too many times, solved it by plugging in back in.
The screen isn't stellar but it will suffice for now, some images:
https://lh3.googleusercontent.com/S8xTvqrWrX98AHMx5aPXfJyNVqBAxwIlAxtOpFT9_M-S8FroTbYDFszCZ4lR678IwEWPMYUZaYxPuC0=w1920-h1014-rw
Another video with a bit of progress, I use push buttons to operate the up/down (turning on/off) motion of the screen and the brightness:
https://www.youtube.com/watch?v=bGd31lbvm7o
I haven't seen a full guide to implement this so that's why I dared to make such a lengthy post. The code I use isn't entirely my work, it's based on something I found on "the internets" I will find the source again and link it here. That was for a V50 tilt screen.
Here's an example code to get you started:
// Connect:
// Screen PIN 4 to Arduino PIN 2 (TX)
// Screen PIN 7 to Arduino ground
enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
//int current_display_mode = RTI_OFF;
int current_display_mode = RTI_NTSC;
bool send_brightness = true;
char current_brightness_level = 13;
//delay between bytes, ms
const int rti_delay = 100;
int once = 1;
void setup() {
Serial.begin(2400);
}
void loop() {
rtiWrite(display_modes[current_display_mode]);
if (send_brightness)
rtiWrite(brightness_levels[current_brightness_level]);
else
rtiWrite(0x40);
rtiWrite(0x83);
}
void rtiWrite(char byte) {
Serial.print(byte);
delay(rti_delay);
}
This will continuously keep the screen alive, if you want to shut it down you will need to change int current_display_mode = RTI_NTSC; to int current_display_mode = RTI_OFF; and update the Arduino. I just added that code so you can try everything. If you for some reason don't manage to update it just unplug the Arduino, the RTI will notice that it's not getting commands and it will automatically shut down.
Here's a better code where I use push buttons to operate the screen:
// Connect:
// Screen PIN 4 to Arduino PIN 2 (TX)
// Screen PIN 7 to Arduino ground
enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
//int current_display_mode = RTI_OFF;
int current_display_mode = RTI_NTSC;
bool send_brightness = true;
char current_brightness_level = 13;
//delay between bytes, ms
const int rti_delay = 100;
int pinNumber = 5;
int pinBrightness = 6;
int stateChange = 0;
void setup() {
Serial.begin(2400);
}
void loop() {
int button;
int buttonBrightness;
pinMode(pinNumber, INPUT);
digitalWrite(pinNumber, HIGH);
button = digitalRead(pinNumber);
pinMode(pinBrightness, INPUT);
digitalWrite(pinBrightness, HIGH);
buttonBrightness = digitalRead(pinBrightness);
if (button == 0) {
stateChange = abs(stateChange - 1);
}
if (buttonBrightness == 0) {
current_brightness_level = current_brightness_level + 3;
if (current_brightness_level == 15 || current_brightness_level == 16) { current_brightness_level = 1; }
}
if (stateChange == 1) {
current_display_mode = RTI_NTSC;
} else {
current_display_mode = RTI_OFF;
}
rtiWrite(display_modes[current_display_mode]);
if (send_brightness)
rtiWrite(brightness_levels[current_brightness_level]);
else
rtiWrite(0x40);
rtiWrite(0x83);
}
void rtiWrite(char byte) {
Serial.print(byte);
delay(rti_delay);
}
The push buttons are connected to the Arduino through the digital pins, in this case PIN 5 (on/off) and PIN 6 (brightness) and both buttons are grounded to the Arduino (in essence I'm putting voltage on PIN 5,6 and watching when it makes contact with ground).
That's kind of all for controlling the RTI and outputting video to it.
My problems as of now:
1. The biggest one is powering off the Odroid safely after the engine stops. I will need to make a controller that notices if the engine is off and commands the Odroid to shut down, I haven't researched it yet.
2. Finding all the right wires on the car and hooking it up, hopefully not setting everything on fire.
3. Something to control the Odroid, currently I have a mouse hooked up. I want to in the first run hook up a touch pad and install it behind the shifter, in the cup holder. That way I can close it and hide it. I'm also planning on adding a touch screen to the RTI assembly, I have a 6.2" one that will fit really well...but I need to write a controller/driver for it so I can connect it though USB to the Android...need to research it.
4. I also want to change the screen...I ordered a Chinese 7" screen with touch panel (would need to modify RTI because it's bigger but just the plastic part, the metal has just about the clearance to fit everything in with a bit of bending). But being a complete novice in electronics I managed to send 12V to the ground of the screen and connected the 12V rail to the ground of the power supply, reversed polarity...fried a few things, popped a few caps. I changed the capacitors and bypassed a voltage regulator but the main chip is heating up and I can only input RGB, can't switch to HDMI. Will need to investigate further.
The Odroid is running a normal Android, I can use any app that's on the Play Store. I'll use Waze, Google Maps and iGO for navigation.
Plan for the future besides the RTI is to make a simple AUX IN for the HU, connected to the back where the CD changer goes, for now it will be just a simple AUX IN, later on I will try to make something that works like the Grom, Yatour devices.
I'm also aware of the iMIV but as I'm planning on switching out the screen it would be almost useless, I would just use it for the lift mechanism and audio in. I already have those taken care of at the fraction of the cost of an iMIV.
Let me know if you have questions.
PS. Theoretically this should work on any P2 Volvo (up to 2009), and the code that I used was tested by the guy who wrote it on a V50 so it should work on that too.
I haven't been too active on this forum, I just consume the information here so I thought I'd give back something to the community.
I've been driving a really lot the last couple of months, long trips outside the country (around Europe) and for navigation I've used a GPS that attaches to the windshield and my phone with Waze. Waze is really great so I've been switching more and more to my phone and I'm ditching the GPS slowly (still have to use it abroad because of roaming cost). The problem is that I don't like the idea of keeping my phone in the sun so I've mounted a holder to the HU and I keep it there but it's not really "in my face" down there and I do have to "give up" the phone a bit when I'm using it, it's not a major problem because it's connected to the HU via bluetooth and I can have calls.
While driving at night I like to have a sort of heads up display of the road in my field of view. Another minus with the phone is the smaller screen size.
My solution: OEM Volvo RTI screen which "runs" Android. Something that is a bit more complicated then it sounds...as I found out later...
A little heads up, I don't have a lot of experience in the field of electronics (next to nothing) and not a lot of knowledge in programming hardware components (a few PIC controller projects in uni a few years ago turning on LEDs :D ).
First step in the project was to get an RTI screen with the lift mechanism, which I got from a donor car from a local breaker.
Next steps were identifying the problems and solving them. First problem, the RTI screen...well it's a bit more complicated then your average desktop monitor... A few sleepless nights searching on the internet turned up some answers on what to use and how to turn on the screen. Second problem, finding something that runs Android (for Waze, Youtube and other apps) well enough to be used day to day, "the internets" helped me out here too. I'll detail below.
So here's the current setup:
https://lh6.googleusercontent.com/k0RMFRFRbRbT_-68SJFGE5sVhm6T9MxO_psAJwLvD_-_1WWPtLoLGKa6kcPcck5f2KRoGO6wQ306SGM=w1920-h1014-rw
As you can see there are 3 components in the setup, firts off the OEM RTI screen, there's an Arduino Mega controller (an open-source electronic platform, I'll explain it's use later on) currently I switched the Mega to an Arduino Nano and last but not least an Odroid running Android (a sort of Raspberry Pi - don't mistake it for a raspberry pie it's not the kind of thing that you eat - that runs Android really well).
A bit more in detail:
The RTI is connected to 12V, ground and 12 ACC. Currently it's running off of a 12V power supply which has 12V and ground, the power supply is connected to the connector on the right side (with 5 pins) which is normally blue, you need to connect 12V to PIN 1 (right most pin), ground goes to PIN 5 (left most pin) and ACC - which I understood to be live only when the engine is running - also takes 12V so I connected the 12V from the power supply to that too, ACC is PIN 3.
So as follows:
PIN 1 <- 12V
PIN 5 <- Ground
PIN 3 <- 12V
PIN 2 and PIN 4 is I guess a backup connection for 12V and ground I didn't connect them up (PIN 2 - 12V and PIN 4 - Ground).
The other connector is the more interesting one, the green one on the left side. This in my setup has 3 important pins, PIN 4, PIN 7 and PIN 10.
Green connector pins explaind:
PIN 4 - serial connection (this is the communication port, we'll use it to send commands to the RTI, it's a unidirectional communication, the RTI is always the receiver)
PIN 7 - ground (you need to ground this to your controller)
PIN 10 - composite video in (we'll send the video feed here, I'm using NTSC but PAL is available on this pin too)
The Arduino is used to start the RTI screen and lift the screen up, also it can control the brightness of the screen.
Connecting the Arduino to the RTI: The ground pin I think is self explanatory, you hook PIN 7 to a ground on the Arduino. This is easy because the Arduino has all of it's pins marked you just connect it to something marked GND and you are good. PIN 4 is the interesting one because this needs to send through serial commands so we will need to connect this up to a serial communication pin on the Arduino too, on the Arduino Mega you have a few transmission pins, the Arduino Nano has just one. It's again easy to find the serial communication pins on the Arduino because they are marked (on the Mega because there's more then one you also have a lable "Communication" where you'll find all the communication pins) we will need to transmit data so you should be looking for TX pins, for best practice I suggest using TX0 pin even on the Arduino Mega and you only have the single TX0 pin on the Nano. (I also used these so my code is compatible with PIN TX0).
So this is the setup for Arduino to RTI:
PIN GND on Arduino -> PIN 7 RTI
PIN TX0 on Arduino -> PIN 4 RTI
Those who have been paying close attention know that there's one component left. The Odroid which is running Android and will output from the CVSB pin (composite video, NTSC) to the RTI.
We have one pin free left from the 3 that we will use in our setup, PIN 10. We need to hook that up to the Odroids video output and we need to ground the Odroid to the whole setup. For ground I grounded the Odroid (there's a ground pin right next to the CVSB on the Odroid) to the Arduino but it can be grounded directly to the RTI too.
So as follows:
CVSB OUT on Odroid -> PIN 10 on RTI
Ground on Odroid -> Ground on Arduino (GND Arduino or any other ground in the setup, the whole RTI metal casing is ground)
Here's an image of the whole setup that I tried to explain in the above lengthy text (if you got lost in it):
https://lh5.googleusercontent.com/kfMmqfcTcMjbsF16MTAieKKhZeJbZTV03sRFApIh5ylGfErMCS n6Lx7y6NvolnsYDDFEx_-K90R3buI=w1920-h1014-rw
The Odroid outputs NTSC video and the RTI is set up to receive NTSC too. RGB can be used somehow too, but I haven't yet got to that. I've been working on this just the last weekend, this is the progress that I made.
Now, the more complicated bit (not that complicated) is programming the Arduino to fire everything up. If anyone has ever coded in C, C++ or any other derivative of these, or more complex programming languages you should be good to go. For the novices in programming I will be your tech support if needed.
The idea is that the RTI needs to receive the "stay alive" command continuously, the "stay alive" command is nothing more then telling the screen what video mode it needs to use, what brightness it should be on (this can be omitted but you still need to send a command instead) and another bit of data, currently not know what this is, I've searched around but didn't find anything on it but to run everything it's needed. Pure speculation on my part for the unknown bit is that it's a sort of end of line character so that the RTI knows that it can execute the command...this is just my thought, could be completely wrong.
I'm using the Arduino to send out these bits and bytes. A more detailed explanation of the 3 pair of bytes we need to send to the RTI:
RTI screen mode: There are several screen modes the RTI can operate on, as follows RGB, NTSC, PAL. Also the first pair of byte controls the on/off of the screen, if you send out either the RGB, NTSC, PAL command the screen will turn on, if you send out the OFF command it will shut down and retract.
The pair of bytes in HEX value for the screen mode: RGB = 0x40; PAL = 0x45; NTSC = 0x4C; Screen off = 0x46;
Screen brightness: There are 16 values for the screen brightness, here are the HEX values from 1 to 16 -> 0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F
The unknown data (probably pair of byte to start executing the command): 0x83 - this needs to be sent out last
Example of turning on the screen with NTSC mode, full brightness: 0x4C 0x2F 0x83 (explination: NTSC | BRIGHTNESS | "Execute Command") - if you want the screen to stay up you need to continuously send this data out, I'm sending it out every 100 ms (added a delay of 100 ms).
A video of my first try:
https://www.youtube.com/watch?v=AuOx__sRwuQ
In the above video I'm using the Arduino Mega but I switched it out with the Nano later on. Also there was a problem with the screen, the electric motor kept running even after the screen went up or down, that turned out to be a connector that was not plugged in to it's socket inside the RTI, that's what you get when you take it apart too many times, solved it by plugging in back in.
The screen isn't stellar but it will suffice for now, some images:
https://lh3.googleusercontent.com/S8xTvqrWrX98AHMx5aPXfJyNVqBAxwIlAxtOpFT9_M-S8FroTbYDFszCZ4lR678IwEWPMYUZaYxPuC0=w1920-h1014-rw
Another video with a bit of progress, I use push buttons to operate the up/down (turning on/off) motion of the screen and the brightness:
https://www.youtube.com/watch?v=bGd31lbvm7o
I haven't seen a full guide to implement this so that's why I dared to make such a lengthy post. The code I use isn't entirely my work, it's based on something I found on "the internets" I will find the source again and link it here. That was for a V50 tilt screen.
Here's an example code to get you started:
// Connect:
// Screen PIN 4 to Arduino PIN 2 (TX)
// Screen PIN 7 to Arduino ground
enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
//int current_display_mode = RTI_OFF;
int current_display_mode = RTI_NTSC;
bool send_brightness = true;
char current_brightness_level = 13;
//delay between bytes, ms
const int rti_delay = 100;
int once = 1;
void setup() {
Serial.begin(2400);
}
void loop() {
rtiWrite(display_modes[current_display_mode]);
if (send_brightness)
rtiWrite(brightness_levels[current_brightness_level]);
else
rtiWrite(0x40);
rtiWrite(0x83);
}
void rtiWrite(char byte) {
Serial.print(byte);
delay(rti_delay);
}
This will continuously keep the screen alive, if you want to shut it down you will need to change int current_display_mode = RTI_NTSC; to int current_display_mode = RTI_OFF; and update the Arduino. I just added that code so you can try everything. If you for some reason don't manage to update it just unplug the Arduino, the RTI will notice that it's not getting commands and it will automatically shut down.
Here's a better code where I use push buttons to operate the screen:
// Connect:
// Screen PIN 4 to Arduino PIN 2 (TX)
// Screen PIN 7 to Arduino ground
enum display_mode_name {RTI_RGB, RTI_PAL, RTI_NTSC, RTI_OFF};
const char display_modes[] = {0x40, 0x45, 0x4C, 0x46};
const char brightness_levels[] = {0x20, 0x61, 0x62, 0x23, 0x64, 0x25, 0x26, 0x67, 0x68, 0x29, 0x2A, 0x2C, 0x6B, 0x6D, 0x6E, 0x2F};
//int current_display_mode = RTI_OFF;
int current_display_mode = RTI_NTSC;
bool send_brightness = true;
char current_brightness_level = 13;
//delay between bytes, ms
const int rti_delay = 100;
int pinNumber = 5;
int pinBrightness = 6;
int stateChange = 0;
void setup() {
Serial.begin(2400);
}
void loop() {
int button;
int buttonBrightness;
pinMode(pinNumber, INPUT);
digitalWrite(pinNumber, HIGH);
button = digitalRead(pinNumber);
pinMode(pinBrightness, INPUT);
digitalWrite(pinBrightness, HIGH);
buttonBrightness = digitalRead(pinBrightness);
if (button == 0) {
stateChange = abs(stateChange - 1);
}
if (buttonBrightness == 0) {
current_brightness_level = current_brightness_level + 3;
if (current_brightness_level == 15 || current_brightness_level == 16) { current_brightness_level = 1; }
}
if (stateChange == 1) {
current_display_mode = RTI_NTSC;
} else {
current_display_mode = RTI_OFF;
}
rtiWrite(display_modes[current_display_mode]);
if (send_brightness)
rtiWrite(brightness_levels[current_brightness_level]);
else
rtiWrite(0x40);
rtiWrite(0x83);
}
void rtiWrite(char byte) {
Serial.print(byte);
delay(rti_delay);
}
The push buttons are connected to the Arduino through the digital pins, in this case PIN 5 (on/off) and PIN 6 (brightness) and both buttons are grounded to the Arduino (in essence I'm putting voltage on PIN 5,6 and watching when it makes contact with ground).
That's kind of all for controlling the RTI and outputting video to it.
My problems as of now:
1. The biggest one is powering off the Odroid safely after the engine stops. I will need to make a controller that notices if the engine is off and commands the Odroid to shut down, I haven't researched it yet.
2. Finding all the right wires on the car and hooking it up, hopefully not setting everything on fire.
3. Something to control the Odroid, currently I have a mouse hooked up. I want to in the first run hook up a touch pad and install it behind the shifter, in the cup holder. That way I can close it and hide it. I'm also planning on adding a touch screen to the RTI assembly, I have a 6.2" one that will fit really well...but I need to write a controller/driver for it so I can connect it though USB to the Android...need to research it.
4. I also want to change the screen...I ordered a Chinese 7" screen with touch panel (would need to modify RTI because it's bigger but just the plastic part, the metal has just about the clearance to fit everything in with a bit of bending). But being a complete novice in electronics I managed to send 12V to the ground of the screen and connected the 12V rail to the ground of the power supply, reversed polarity...fried a few things, popped a few caps. I changed the capacitors and bypassed a voltage regulator but the main chip is heating up and I can only input RGB, can't switch to HDMI. Will need to investigate further.
The Odroid is running a normal Android, I can use any app that's on the Play Store. I'll use Waze, Google Maps and iGO for navigation.
Plan for the future besides the RTI is to make a simple AUX IN for the HU, connected to the back where the CD changer goes, for now it will be just a simple AUX IN, later on I will try to make something that works like the Grom, Yatour devices.
I'm also aware of the iMIV but as I'm planning on switching out the screen it would be almost useless, I would just use it for the lift mechanism and audio in. I already have those taken care of at the fraction of the cost of an iMIV.
Let me know if you have questions.
PS. Theoretically this should work on any P2 Volvo (up to 2009), and the code that I used was tested by the guy who wrote it on a V50 so it should work on that too.