Hey I connected Arduino Uno with HC05 Bluetooth module with pins (HC05 - RX, TX, VCC, GND to Uno - 10, 11, 5v, GND) and I've successfully connected ELM327 bluetooth obd2 tool to arduino. I have this code to read engine rpm but it is not getting connected to the obd2 scanner. please help me out with this. I'm doing this on a Skoda Octavia mk2 (Laura).
Code:
#include "ELMduino.h"
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
ELM327 myELM327;
uint32_t rpm = 0;
void setup()
{
#if LED_BUILTIN
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
#endif
Serial.begin(115200);
mySerial.begin(115200);
Serial.println("Attempting to connect to ELM327...");
if (!myELM327.begin(mySerial, true, 2000))
{
Serial.println("Couldn't connect to OBD scanner");
while (1);
}
Serial.println("Connected to ELM327");
}
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();
}```
O/P:
Couldn't connect to OBD scanner
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
Sorry about that
this the connection I used for arduino and hc05. Later seeing other forums most of them used esp32 with builtin bluetooth so I decided to switch to it but still no progress but feel free to help me out on this as well
but the thing is I want to see the list of DTCs present in the car... I know 01 01(Service 1 01 ) gives the Monitor dtcs status response but I want to request the ECU for Service 3 which shows the stored DTCs:
I want to see what are the trouble code present in my car... as I mentioned earlier I'm doing this in Skoda laura 2011 model (India) which communicates with ISO 15765-4 CAN (11 bit ID, 500 kbit/s).