Here's a quick project update.
I've been fighting with the bluetooth connectivity for days. This is one of the most ill documented things, not to mention complex I've ever encountered. One would think that it would be a relatively common thing to do data acquisition on an Arduino and pass the data wirelessly to an Android device, but alas it's not. There are lots of examples of controlling an Arduino from an Android by passing single bytes of data, but almost nothing the other way around, particularly using actual data strings.
I've finally got the Arduino passing data strings to the Android relatively reliably. 85 - 90% of the data coming in is good and fortunately I have a way that I can easily recognize the bad data and discard it. If I look at the raw data, it's being received 100% reliably, so there's something with the code that's dropping data. It think it's a timing thing, as what finally got things working was putting in some arbitrary delays. I'm sure that someone out there, will come up with some better code that will make things a lot better.
The way things are currently configured, I'm sending 4 readings per second, which is entirely adequate for temperatures and pressures. If I were attempting to read and present rpms for example this would not be adequate.
Up until now, I wasn't sure if I would be able to get a bluetooth signal from the engine compartment to the passenger compartment. Today I took my breadboard Arduino and stuck it in the front of the engine compartment where I intend to mount it, turned it on and closed the hood. I booted the Android phone into the skeleton application from the normal position in the cabin and was able to read the data stream coming in. The range is not all that great - moving toward the back of the car, I quickly lost the signal, but moving back to the drivers seat provided a very solid signal.
I can now confidently order the rest of the sensors and get the Arduino coded up to supply real data and the Android parsing the incoming data and passing it to the "gauges" part of the program.
More to come...
__________________
Current Stable
- 380SL (diesel)
- Corvette C5
- Manx
- Baja Bug
- F350 Powerstroke
- Auburn Boattail Speedster replica
|