ELMduino: Getting either zero values or extremely high wrong values from every request
Hi, Im looking for some help about a little project in which im working on.
Im trying to get some data from my OBD2 ELM327 adapter, then the data will be uploaded to one server through HTTP request with a SIM800L gprs module, I can confirm that everything is working fine except the data that im receiving from the OBD, every time I do a request I get the message “Response not detected”, this cause extremely high wrong values or 0 values some times, the ELM327 is working fine, i can get the right data with the Torque App, also i was able to try the code with an ELM327 simulator on android, the code works fine with the simulator, for some reason i only have this problem when I use the real adapter.
void loop() {
if (myELM327.status == ELM_SUCCESS) {
//rpm = (uint32_t)tempRPM;
rpm = myELM327.rpm();
consumoCombustible = myELM327.fuelRate();
millaje = myELM327.distTravelWithMIL();
torque = myELM327.torque();
temperaturaTomaDeAire = myELM327.intakeAirTemp();
temperaturaRefrigerante = myELM327.engineCoolantTemp();
temperaturaAmbiente = myELM327.ambientAirTemp();
temperaturaAceite = myELM327.oilTemp();
//potencia=myELM327.rpm(); //La potencia no se puede obtener
DEBUG_PORT.println("RPM: " + (String)rpm);
DEBUG_PORT.println("Consumo de combustible: " + (String)consumoCombustible);
DEBUG_PORT.println("Millaje: " + (String)millaje);
DEBUG_PORT.println("Torque: " + (String)torque);
DEBUG_PORT.println("TemperaturaTomaDeAire: " + (String)temperaturaTomaDeAire);
DEBUG_PORT.println("TemperaturaRefrigerante: " + (String)temperaturaRefrigerante);
DEBUG_PORT.println("TemperaturaAmbiente: " + (String)temperaturaAmbiente);
DEBUG_PORT.println("TemperaturaAceite: " + (String)temperaturaAceite);
//DEBUG_PORT.println("Potencia: "+(String)potencia);
//Orden de las variables: RPM,Consumo de combustible,Millaje,Torque,Temperatura de la toma de aire,Temperatura del refrigerante,Temperatura ambiente,Temperatura del aceite,potencia
//Envio con todos los datos para cuando el servidor este preparado
//gsm_http_post("param="+(String)rpm+" "+(String)consumoCombustible+" "+(String)millaje+" "+(String)torque+" "+(String)temperaturaTomaDeAire+" "+(String)temperaturaRefrigerante+" "+(String)temperaturaAmbiente+" "+(String)temperaturaAceite+" "+(String)potencia);
//Envio de solo dos datos para pruebas en el servidor de testing
gsm_http_post("param=" + (String)rpm + " " + (String)consumoCombustible);
delay(tiempoDeActualizacion);
} else {
DEBUG_PORT.println("El OBD2 tuvo un problema recibiendo la informacion del coche, reintentando....");
delay(1000);
}
}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (10 by maintainers)
Commits related to this issue
- Fix issues #81 and #83 — committed to PowerBroker2/ELMduino by PowerBroker2 3 years ago
It looks like everything is working now, Im reading consistent values and most important, the RPM corresponds with the RPM of the Torque App
I really thank you, it looks like finally this is the solution
The library supports all PIDs that have corresponding functions (i.e. the ones you’re trying to use). The “NO DATA” response is coming directly from the ELM327 and is an issue with either your car or ELM327.