Giter Site home page Giter Site logo

ESP32 Connection about elmduino HOT 19 CLOSED

powerbroker2 avatar powerbroker2 commented on July 3, 2024
ESP32 Connection

from elmduino.

Comments (19)

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024 1

Please edit your code so that it's properly formatted and tabulated

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

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 Carly Adapter? Also, what do you mean when you say it's been working to this point yet gives you errors? Have you always been getting the errors? Was there a time you weren't getting the errors?

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.

from elmduino.

Felix-Jost avatar Felix-Jost commented on July 3, 2024

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.
I'm using 2 OBD ELM327 Adapter (OBDII and Carly Adapter) names of the adapter.
Its connect to the ELM327 but if I want to get the rpm is says Error 7.

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

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.

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024

I am also using a standard OBDII adapter ELM327 like zou can buy everywhere, i tried both of them ...

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024

image

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

What code did you use for the standard adapter?

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024
#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);
  }
}

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024

image

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024

So the name of the ELM327 is OBDII so thats correct,

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

Are you testing with the car on and running?

from elmduino.

jostfelix avatar jostfelix commented on July 3, 2024

Yes , i will try it tomorrow again.

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

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.

from elmduino.

Felix-Jost avatar Felix-Jost commented on July 3, 2024

When iam compiling this sketch its says LED_BUILTIN was not declared ?
How should I declare it ?

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

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?

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

Just out of curiosity, why do you use two GitHub accounts?

from elmduino.

Felix-Jost avatar Felix-Jost commented on July 3, 2024

Iam Compiling for a ESP32 Dev Module

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

You can just delete those two lines in the sketch

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on July 3, 2024

Haven't heard a response, assuming everything is working. If you have an update, feel free to reopen.

from elmduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.