Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard PID Request #274

Open
interardu opened this issue Feb 13, 2025 · 2 comments
Open

Standard PID Request #274

interardu opened this issue Feb 13, 2025 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@interardu
Copy link

interardu commented Feb 13, 2025

Hi. I'm guess I'm asking for you to do my homework for me....

I am trying to get Lambda data.

I have been following this #84 but the format has changed for the latest version? I am using the latest version of Elmduino according to the "Manage Libraries" in Arduino IDE.

This is the code I am using

if (DATArequest == 0){
float templambdaRATIO = myELM327.processPID(1, 36, 4, 1, (2.0 / 65536.0),0);
DATArequest = 1;
  if (myELM327.nb_rx_state == ELM_SUCCESS)
  {
    lambdaRATIO = templambdaRATIO;
 Serial.print(lambdaRATIO);
    DATArequest = 0;
  }
  else if (myELM327.nb_rx_state != ELM_GETTING_MSG)
   SENSORnum++;
DATArequest = 0;
}

with debug enabled it returns "no data"

I can pull the data like coolant temp and rpm no problem.

The solution you gave in the issue linked above was to go from

2, 2.0/65536);

to

>> (((myELM327.numPayChars / 2) - 2) * 8)) * (2.0 / 65536.0)

I don't know what I need to do with the new format.....

@interardu interardu added the question Further information is requested label Feb 13, 2025
@jimwhitelaw
Copy link
Collaborator

@interardu "No Data" response means that the request/response is OK, but the ECU has no data for that PID. Your previous example queried for OXYGEN_SENSOR_1_C which is PID 0x34, but your new code is querying for PID 0x36 (OXYGEN_SENSOR_3_C). Is that your intent?

@interardu
Copy link
Author

Oh! That is probably the problem.
Ive been using an Uno until now but I think there might be memory issues, it doesnt work consistently. Ive got a Pro mega today. Ill get that up and running over the next few days.
Thank you for taking the time to help me, I appreciate it. Not sure why I put 36. Ill try 34 and see if it works and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants