Today's news is this: I've all the parts, and the LCD up and running! I still have to fool around with software, of course, but this is a great start.
Some great news! I plugged the Pi into my car and managed to get some readings off the ECU! This was just a test but it certainly worked.
|OBD II link cable|
My setup was as follows. I have a Samsung Galaxy S3 (just got it), and I downloaded an app called ConnectBot. I managed to get a very weak signal to my home wifi in my car parked outside (I live in an appartment so I'm just happy it worked), and was able to SSH into the Pi from my phone.
|SSH on my phone|
One thing that I've been trying to get working unsuccessfully is setting up a different wifi connection on the Pi. I want to use my phone's tethering hotspot so that I will have a perfect signal and can test it out anywhere, rather than having to drive out back and test various areas to get a decent connection. It was quite frustrating and I had to reconnect multiple times.
As you can see in the SSH screenshot, the value I received from sending 0105 was 1 05 76. 1 05 is simply the code I sent (I think I had headers turned off), while 76 is the hex value returned. According to wikipedia, to get the coolant temp in °C, you must subtract 40 from the value. 76 (hex) is 118, so my coolant temp was 78°C.
There's still a lot of testing to do, but I think I might be able to start on a C++ program to at least put a basic output on the LCD.
In the meantime, I bought a phone dock and plan to use my Galaxy S3 as my media center. It has everything I really need - GPS, maps, music, etc. I plan to set up the Pi so that I can remove it fairly easily and still use it for other things, such as streaming movies off my media server at home.
Just a little update. I tried a few different distros on the Pi, namely Raspbmc and Xbian. They both worked pretty much the same, if I recall, I think I liked Raspbmc just slightly more, but either would do fine as a multimedia platform for movies and a few other things. I didn't thoroughly investigate addons for them, but there's definitely a lot out there. For people looking for an entertainment center, these distros might be a good start. They worked great at home, streaming 1080p video to them from my media server.
The other thing is I have been having issues with my wifi dongle. I went to the store to buy a new one and, sadly, it was not compatible with the Pi. I returned it and picked up another one that they had, the only one which appeared on the "working" list (http://elinux.org/RPi_VerifiedPeripherals) but, unfortunately, I had no luck with that one either after toying around with it for a few hours. So, I was a bit hooped for a while, but I just put in an order for one that is definitely on the list and... well, fingers are crossed.
In the mean time I've been working on a C++ project and have learned a lot. When I get the wifi dongle I'll be able to do a little more testing with the LCD screen, and then hopefully get some crude code written that can talk with my car.
A few things to mention here. First up is something quick. You're going to want your Pi to login automatically when it boots, so here's how to do it: http://www.elinux.org/RPi_Debian_Auto_Login
Second up is the issue that a lot of people have brought up in the comments about starting up and shutting down safely in a car. There's a pretty good solution to this. Firstly, see this thread for a little information on Waking From Halt. Basically you can setup the Pi to wake up from halt state with a push button on the GPIO pins. In that thread is a link to this page on how to wire in a reset button (he uses a PC reset button).
So that's great, but what about safe shutdown? Not too hard, actually. There's a DIY method and a $30 method. The DIY is this: run a relay on the car's ACC power - this is the one that turns on your radio. Then run the relay to two GPIO pins. When the relay loses power, a simple program (using WiringPi) can tell the Pi to "sudo halt" and put it into the halt state. Then when you turn the car back on, possibly with the same relay spliced to the reset pins, it reboots the Pi out of halt state and away you go. For power, it will be permanently connected via a 12V->5V converter. You can use something like this buck coverter for $7 (available in wired or USB versions).
For the purchase version, you can see this post. He's made a Pi power switch that will turn it on and off safely. However, he's also made a car version. I emailed him about it, he said it would be $30 plus shipping and they're printing them right now. He had this to say about it:
"After some tests with the prototypes, it indeed looks like the final design will be best suited with +/- connections to battery and the ACC line serving as the switch (much in the same way a car stereo would be hooked up). My original concern was that after switching off the car, if the Pi for some reason froze or didn't shut down then it might drain the car battery while the car was off. I've programmed the switch's processor with a mode that will cut power to the Pi if the ignition has been off for more than 30minutes and the Pi is still drawing power. It's not ideal but it would prevent the Pi from draining the battery and if the Pi is indeed frozen then it would need that hard shutdown anyhow. The car switch will come with an attached 12-14V step-down converter to 5V, capable of providing over 2amps."
So that's pretty great. Right now I'm working on trying to get a push button to boot the Pi into XBMC from terminal (I'm running the standard Raspbian OS). On the note of XBMC, you can install it on Raspbian just fine, so you don't need Raspbmc or Xbian - which is great if you want to run other stuff than just XBMC. You can find instructions here.