Standard PID Request
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 https://github.com/PowerBroker2/ELMduino/issues/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 "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?
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.