Go Down

Topic: CAN BUS Shield won't Initialize (Read 124 times) previous topic - next topic

piesauce

Hi All,

I switched boards from a sparkfun red board (uno) to a Mega ADK board.  What would cause my CAN BUS shield not to initialize from board to board?  The code uploaded to the Mega is the same one I used for the uno. 

My CAN libraries are:

<SPI.h>
<mcp_can.h>
<mcp2515.h>
<mcp2515_defs.h>

const int SPI_CS_PIN = 10;
MCP_CAN CAN(SPI_CS_PIN);


I'm using this to show initialized:

Code: [Select]

while (CAN_OK != CAN.begin(CAN_125KBPS))

{
 
Serial.println("CAN BUS shield init fail");
Serial.println("  Init CAN BUS Shield again");
delay(100);
}
Serial.println("CAN BUS Shield init ok!");
}

Go Up