-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Hey guys , im getting always the same error using ELMduino library , right now im using OBDsim to simulate the elm327 on my PC via bluetooth (i get the exact same response when using it in my car with a standard ELM327 bluetooth adapter) .
I can make it work with the softwareSerial library but im having trouble converting the rpm value from hexadecimal to decimal , thats why im trying ELMduino.
The code im using:
#include <SoftwareSerial.h>
#include "ELMduino.h"
SoftwareSerial mySerial(8, 9); // RX, TX
ELM327 myELM327;
uint32_t rpm = 0;
void setup()
{
Serial.begin(115200);
mySerial.begin(115200);
myELM327.begin(mySerial, true, 2000);
}
void loop()
{
float tempRPM = myELM327.rpm();
if (myELM327.nb_rx_state == ELM_SUCCESS)
{
rpm = (uint32_t)tempRPM;
Serial.print("RPM: "); Serial.println(rpm);
}
else if (myELM327.nb_rx_state != ELM_GETTING_MSG)
myELM327.printError();
}
The serial monitor loops this and the rpm is always 884:

This is the OBDSim log , it is getting the commands to reset and the queries.
Hope someone can help me fix this , thanks :)
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
