I am trying to use this code with a Seeeduino Can Bus Shield and a Arduino R3. I am using this library CAN_BUS_Shield/CAN_BUS_Shield at master · yexiaobo-seeedstudio/CAN_BUS_Shield · GitHub. the send.ino
#include <mcp_can.h>
#include <SPI.h>
void setup()
{
// init can bus, baudrate: 100k
CAN.begin(CAN_125KBPS);
}
unsigned char stmp[8] = {0x10, 0x00, 0x20, 0x00,0x0 0,0x0 0, 0x00, 0x00};
void loop()
{
// send data: id = 0x430, standard flame, data length = 8, stmp: data buf
CAN.sendMsgBuf(0x430, 0, 8, stmp);
delay(1000); // send data per 1000ms
}
I tried hooking this up to a bench setup with a vehicle amplifier, display, and a switch bank. I am also running Vector Canoe and simulating some other in vehicle messages. I am using canoe to read the bus messages on the Can bus. I have the correct baud rate and correct id and dlc. When I run the setup I can see all the messages from my hardware and the simulated canoe messages but as soon as I hook up the Can shield w/ Arduino I get error frames from those components. I then unhooked the can lines and read the signal with an Oscope. The CAN signal looked good(sorry no photo right now). I then changed the code to delay for 5 seconds in between message send commands and noticed there is a constant signal coming out of the CANH and CANL ports. It does this with CAN lines not connected to anything and with CAN lines connected in circuit. I am not a very good programmer so I dont where to start with figuring out if this is a software issue or a hardware issue. Any guidance would be greatly appreciated.