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

How to use the No-Blocking function for standard PID (such as OBD standard)? #257

Open
wcjxixi opened this issue Jul 24, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@wcjxixi
Copy link

wcjxixi commented Jul 24, 2024

I want to get the OBD standard of the vehicle, but I want to use the No-Blocking function.

My code:

void getOBDStandard() {
  char OBDStandard[20];
  myELM327.sendCommand_Blocking("0128");    // Service 01 / PID 28
  if (myELM327.nb_rx_state == ELM_SUCCESS) {
    myELM327.get_response();
    for (byte i = 0; i < myELM327.PAYLOAD_LEN; i++) {
      OBDStandard[i] = myELM327.payload[i];
    }
  Serial.println("OBD Standard is: " + String(OBDStandard));
  } else if (myELM327.nb_rx_state != ELM_GETTING_MSG) {
  Serial.println("OBD Standard is: " + "Unavailable");
  }
}

The code above gives me the original response packet.

Which function in the ELMduino library should I use to parse the response packet? In this way, I can get the values representing the OBD standard (such as 1, 2...etc.).

I am a newbie. Please give me some tips, or better yet, add and modify the corresponding code in my code, thank you very much!

@wcjxixi wcjxixi added the question Further information is requested label Jul 24, 2024
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

2 participants