CAN_Bus_Shield update messes with MCP2515

I recently tried to use a motor using the Can_bus_shield library which didn't work on my pc but did on other only to find out that it was due to the CAN_Bus_Shield library.

I inspected each file to find a difference between a working Can_Bus_Shield library and a non working one, here is what I found :

In the /Documents/Arduino/libraries/CAN_Bus_Shield/src/mcp_2515.h a single line is change :
"virtual byte begin(uint32_t speedset, const byte clockset = MCP_16MHz);"
From
"virtual byte begin(uint32_t speedset, const byte clockset = MCP_8MHz);"

It might be a know thing but if your having a similar issue, consider looking this line in the file and change it to the right frequency !

Note : I had to reboot my pc too after modifing the file for it to work !

1 Like