-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
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);
}
}
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
