View Single Post
Old 04-10-2011, 03:21 PM   #682 (permalink)
edllew
EcoModding Lurker
 
Join Date: Oct 2010
Location: Oregon
Posts: 4

Vibe - '04 Pontiac Vibe
90 day: 33.97 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry to hear your ELM327 broke. I am hoping I don't do the same to mine...

I solved my engine off/engine on problem previously mentioned, so I am good to go with the code, and will now focus on containing all my wires in proper cabling and a box.

In all, to get the code running for my 2004 Pontiac Vibe, I made three changes to r193:

1.
elm_init(): Serial.begin(38400); (was 9600)

2.
elm_init(): removed command "ATDPN" through the end of the function, which removes the ISO-9141 SET HEADER command.

3.
loop(): in the non-useECUState part, following the call to save_params_and_display(), 3 lines added, which put the ELM in a state which makes it work for me on engine restart:
elm_command(str, PSTR("ATWS\r")); //warm start
delay(1000);
elm_command(str, PSTR("ATE0\r")); //echo off

These tweaks are not meant to be general solutions. They are just what is working for me, and might help someone else too. So I wouldn't recommend modifying the code base with them without a bit more investigation (like why the SET HEADER was there, and why it doesn't work for me). I'll pass on anything I learn.

The loop() code uses a few global variables that I failed to understand, and the two halves of loop() (one for useECUState and on for not) may have diverged over time. Which is to say that my ELM warm-start solution in loop() may cause other side-effects and problems.
  Reply With Quote