i downloaded the CAN BUS library from https://github.com/Seeed-Studio/CAN_BUS_Shield
running the example “receive_check”
my hardware is
Arduino R3 UNO x 2
Arduino Mega2560 x 1
CAN BUS Shield V1.2 10/23/2014 by Seeed Studio x 2
(i just stack them together)
I tried both
const int SPI_CS_PIN = 9;
const int SPI_CS_PIN = 10;
and changed
#define MCPDEBUG (1)
but after uploaded the program, the serial output
Enter setting mode fail
CAN BUS Shield init fail
Init CAN BUS Shield again
Enter setting mode fail
CAN BUS Shield init fail
Init CAN BUS Shield again
Enter setting mode fail
CAN BUS Shield init fail
Init CAN BUS Shield again
ONLY POWER red LED light up on the shield, other LEDs not lighting up.
(tried power with 12V DC
or USB-serial cable)
(tried solder the CS from 9 to 10 at the back)
(tried 2 different 1.2 CAN BUS SHIELD)
(tried 2 different UNO R3)
(tried Mega2560)
(tried different library , e.g. coryjfowler’s)
The result is same, stucking at CAN init, always FAIL
I struggled for 48 hours already, anyone could help and knows what’s wrong??
Thanks.
Hello,
Could you please show me how you connect both boards? Thx
Here is the right method to connect them.
Make sure you have plugged those pins into the position.
If it still does not work, there might be some problem with hardware.
But you have tried two boards; It is little possibility they are all broken. Is your wire all right ?You can test them with a multimeter.
Good luck!
[attachment=0]20190202175018.jpg[/attachment]
[attachment=1]20190202174954.jpg[/attachment]
My connection is the same as your picture, i tried to use multimeter to test the pins connection, they are connected…guess i got broken shields from a damaged batch boards…