This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Existing libraries for using CAN BUS Shield on nRF52840 DK?

Dear DevZone,

I'm trying to use the Seeed CAN BUS Shield V2.0 (MCP2515) with the nRF52840 DK, but the library provided is written for Arduino One.

Do you know if any already translated library to be used on nRF52840 is available?

Otherwise, do you have any suggestion for the translation? I should send/receive message from a sensor.

Thank you,

Gianluca

Parents
  • Basically you just have to take the arduino files like mcp_can_cpp and use the nRF Functions from  for SPI reading/writing instead of the Arduino functions (see the spi example in the SDK). SPI reading/writing is only needed in the MCP DRIVER functions. The OPERATOR functions basically don't need to be changed. Of Course you have to rename every "byte" to "uint8_t" and make some minor other changes as mcp_can.cpp was written in C++….

Reply
  • Basically you just have to take the arduino files like mcp_can_cpp and use the nRF Functions from  for SPI reading/writing instead of the Arduino functions (see the spi example in the SDK). SPI reading/writing is only needed in the MCP DRIVER functions. The OPERATOR functions basically don't need to be changed. Of Course you have to rename every "byte" to "uint8_t" and make some minor other changes as mcp_can.cpp was written in C++….

Children
Related