Finally,
Started to use the Arduino a couple of months ago with no former knowledge in coding. My goal was to display car ECU values on a small graphical LCD. Started of with the nice KS0108 Library that MEM here on the forum wrote and after a while that was under controll, thanks MEM.
Next step was to find a way to talk with the car ECU, ELM327 was the solution.
After some regular serial.print commands the car ECU responded with values that i was looking for, but my knowledge ended here and i had a hard time to display the values.
So, after a couple of days reading the code Magister and others at the ecomoder forum have created i figured it out.
Without the people that made the core of this code it would be hard for me to capture the reply that is given from ELM327 and to display it.
So what i did was to cut down big parts from the original code, parts that will read fault codes and other nice functions are removed so the code will fitt the ATmega168.
I am keeping the bootloader but need more memory so will be removing it soon, buying a AVR-ISP is on the list.
I did try to download the sanguino bootloader to a ATMega644P this weekend but never got it working. Maybe just wait for the ATMega328p that will pop right in the arduino or order a sanguino, time will tell.
Remember that this code is far from complete and that i am a rookie but proud of my progress...
I set the baud rate to 38400 and found that my car supports protocol 4 and 6. Protocol 4 contains some intresting valueus that can not be found in protocol 6 but the protocol update rate is really slow. Do not know if that is due to the code or just that can bus protocol 6 has a faster response rate?
Now i need to clean up the code, get more memory, add buttons to controll a menu, arrenge more graphical options, activate the fault code reading and so on.
Any ideas are welcome.
In the attached link below you can find the black box prototype build i have done, ELM327, KS0108 graphical LCD and a arduino. Trust me, there is no free space in that box now.
http://public.fotki.com/HULK77/ks0108/
Picture of the display showing speed, temprature and curve of the rpm. RPM is also shown in a value on the right side and the top right value is the peak value of the RPM.
Next prototype will not contain the complete ELM327 board supporting a computer connection. I will use another LCD and a arduino mini or smaller, all will be mounted in a smaller case.
I am using Arduino version 11 for this code and the GLCD Library found below.
http://www.arduino.cc/playground/Code/GLCDks0108
Original post at eco modder:
Sorry, no video. Phone picture will have to do for now.