ARDUINO UNO WITH SEEED CAN SHIELD v2 Please HELP

Hello people, I’m Murat.

I have a question for you, I first looked here in the forum but found nothing.

I bought an Arduino uno with a Can Shield V2 from SEEEDStudio. as far as everything is fine, I connected it and uploaded a test example from Seeed Libary. I get the message, Can bus init ok but don’t get any data from the Can. I’ll go crazy. I’ve been trying to get data unsuccessfully for 3 days. Can someone help me please. Settings are default. SPI_CS pin on 9 is also declared that way.
When i connect with DB9 to OBD2 cable and the Car i will become pwr on shield but the rest light are off, no rxd or txd.

and iam tested all baudrates, from the libary. from 5 to 1000 KBPS

THE CODE WHAT I USE:

#include <SPI.h>
#include “mcp_can.h”

/SAMD core/
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define SERIAL SerialUSB
#else
#define SERIAL Serial
#endif

// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
const int SPI_CS_PIN = 9; // DEFAULT Setting

MCP_CAN CAN(SPI_CS_PIN); // Set CS pin

void setup() {
SERIAL.begin(115200);

while (CAN_OK != CAN.begin(CAN_500KBPS)) { // init can bus : baudrate = 500k
SERIAL.println(“CAN BUS Shield init fail”);
SERIAL.println(" Init CAN BUS Shield again");
delay(100);
}
SERIAL.println(“CAN BUS Shield init ok!”);
}

void loop() {
unsigned char len = 0;
unsigned char buf[8];

if (CAN_MSGAVAIL == CAN.checkReceive()) { // check if data coming
CAN.readMsgBuf(&len, buf); // read data, len: data length, buf: data buf

unsigned long canId = CAN.getCanId();

SERIAL.println("-----------------------------");
SERIAL.print(“Get data from ID: 0x”);
SERIAL.println(canId, HEX);

for (int i = 0; i < len; i++) { // print the data
SERIAL.print(buf*, HEX);*

  • SERIAL.print("\t");*
  • }*
  • SERIAL.println();*
  • }*
    }

Did you check out the Seed website? here They have lots of documentation and learning videos about how o use the V2 shield with a car

Yes i will check it, i have test now 2 shields one shield sends data and the other receive. it works. but if i connect it to the car obd i get no data.

ANY GUY AN IDEA?

muratbenz:
Yes i will check it, i have test now 2 shields one shield sends data and the other receive. it works. but if i connect it to the car obd i get no data.

Did you verify the connection to the obd? like you have the correct pins identified?

hi bro yes i use the db9 to obd cable its plug and play

Now i check only 2 cables from shield to car high and low can to obd fin pin 6 and 14 into the car, same i havent data. What struck me was no matter whether I ran with db9 cable or directly with the 2 cables and obd pins. Only pwr comes on the can shield. Nothing else lights up on the Shield. However, at least the int must light up red, even if no data is present. Tried the 2 boards. one sends one receives. that works fine so far, then changed the baud rate, then rxd and twd go off but int lights up. And when I connect the cable or pin to the car, only green, nothing red lights up. The car is a mercedes W219 cls63 amg. OBD exists. I'm still going crazy. I've been working on it for 3 days.

I'm no expert and I'm having trouble with this too, but looking at your sketch, it seems like you are waiting for a message, while, according to my research (which could be flawed btw), OBDII doesn't just send you data, you have to request it.

Hi Murat,

i have the same problems and found your topic. Did you solved the problem and share it with me?