-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 Connection #11
Comments
Is this related to issue #9? If so are you trying to use an ESP32 or ESP8266? Are you sure the OBD scanner's bluetooth name is Sorry for the barrage of questions, but when submitting issues you need to provide as much clarity and detail as possible so that I can more easily help. |
In issue #9 its all works fine with the Wifi adapter and ESP8266 thx for that. but now I'm using a ESP32 now so its not related to issue#9. |
It looks like the Carly Adapter requires a BLE connection. The code you provided is "normal" bluetooth. To be honest, I'm not sure how to connect to a BLE device since I don't have a BLE OBD scanner. Take a look at some ESP32 BLE examples and see if you can connect and communicate with the Carly Adapter. |
I am also using a standard OBDII adapter ELM327 like zou can buy everywhere, i tried both of them ... |
What code did you use for the standard adapter? |
#include "BluetoothSerial.h"
#include "ELMduino.h"
#define ELM_PORT SerialBT
#define ESP_BLUETOOTH_NAME "ESP32"
BluetoothSerial SerialBT;
ELM327 myELM327;
uint32_t rpm = 0;
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
Serial.begin(115200);
ELM_PORT.begin(ESP_BLUETOOTH_NAME, true);
Serial.println("Attempting to connect to ELM327...");
if (!ELM_PORT.connect("OBDII"))
{
Serial.println("Couldn't connect to OBD scanner - Phase 1");
while (1);
}
if (!myELM327.begin(ELM_PORT))
{
Serial.println("Couldn't connect to OBD scanner - Phase 2");
while (1);
}
Serial.println("Connected to ELM327");
}
void loop()
{
float tempRPM = myELM327.rpm();
if (myELM327.status == ELM_SUCCESS)
{
rpm = (uint32_t)tempRPM;
Serial.print("RPM: "); Serial.println(rpm);
}
else
{
Serial.print(F("\tERROR: "));
Serial.println(myELM327.status);
delay(100);
}
} |
So the name of the ELM327 is OBDII so thats correct, |
Are you testing with the car on and running? |
Yes , i will try it tomorrow again. |
Ok, also are you using the latest release of the library? Did you edit the library yourself? It's bizarre because I haven't had trouble getting an ESP32 to communicate like this. |
When iam compiling this sketch its says LED_BUILTIN was not declared ? |
It's declared in the Arduino Core for you. It works for all Arduinos as far as I'm aware. What board are you compiling for? |
Just out of curiosity, why do you use two GitHub accounts? |
Iam Compiling for a ESP32 Dev Module |
You can just delete those two lines in the sketch |
Haven't heard a response, assuming everything is working. If you have an update, feel free to reopen. |
I used the following to connect to my ELM327, to this Point ist al working good but the readout is ERROR: 7 and it wont be displaying my rpm.
I also check my ELM327 with torque app and it all Works fine.
The text was updated successfully, but these errors were encountered: