Skip to content

Not able to get Ecu data from Jeep compass #34

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

Open
Nikhil0351 opened this issue Jan 29, 2020 · 1 comment
Open

Not able to get Ecu data from Jeep compass #34

Nikhil0351 opened this issue Jan 29, 2020 · 1 comment

Comments

@Nikhil0351
Copy link

Hello sir,
Im trying to receive the data from jeep compass ecu. Using the Can_receiver sample program we are getting different data.

Im trying the engine rpm example code.

// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
//
// This examples queries the engine RPM (OBD-II PID 0x0c) once a seconds and
// prints the value to the serial monitor
//
#include <CAN.h>

// Most cars support 11-bit adddress, others (like Honda),
// require 29-bit (extended) addressing, set the next line
// to true to use extended addressing
const bool useStandardAddressing = true;

void setup() {
  Serial.begin(9600);

  Serial.println("CAN OBD-II engine RPM");

  // start the CAN bus at 500 kbps
  if (!CAN.begin(500E3)) {
    Serial.println("Starting CAN failed!");
    while (1);
  }

  // add a filter to only receive the CAN bus ID's we care about
  if (useStandardAddressing) {
    CAN.filter(0x7E8);
  } else {
    CAN.filterExtended(0x18daf110);
  }


  
}

void loop() {
  if (useStandardAddressing) {
    
    CAN.beginPacket(0x7DF, 8);
  } else {
    CAN.beginExtendedPacket(0x18db33f1, 8);
  }
  CAN.write(0x02); // number of additional bytes
  CAN.write(0x01); // show current data
  CAN.write(0x0c); // engine RPM
  CAN.endPacket();

  while (CAN.parsePacket() == 0 ||
         CAN.read() < 3 ||          // correct length
         CAN.read() != 0x41 ||      // correct mode
         CAN.read() != 0x0c);       // correct PID
  float rpm = ((CAN.read() * 256.0) + CAN.read()) / 4.0;

  Serial.print("Engine RPM = ");
  Serial.println(rpm);
   delay(1000);
   
}

what could be the issue? Please help me.

Best regards.

@Petros144
Copy link

is the Jeep 8 bit or 11 bit CAN ID?

const bool useStandardAddressing = true;

Try false here maybe it work. Check connections

fterretf added a commit to fterretf/arduino-CAN that referenced this issue Jun 2, 2023
fterretf added a commit to fterretf/arduino-CAN that referenced this issue Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants