Newbie question - change of code when changing expansion board

Hello,
I am really just starting with Arduino. Made a prototype for a CAN to CAN translator, which is tested and works with a sketch I got online. I want to make the hardware to look good and there are few ways to do it, but looking for suitable boards, I found one that uses different Microcontroller (P2040 instead of ATMega4809), that is supported by the IDE, so shouldn't be an issue, but the CAN controllers are different:

  • MCP2515 in the original sketch/prototype;
  • GD32E103CBT6 in the "CANbed DUAL" I intend to try.

So my question is, will changing the library alone will be enough, or I will need to adjust the code as well?
Many thansk!
Vladimir

Can't say for certain, but I think a good chance you will need to change the code.

A different CAN controller chip may need a different library. A different library may need different code, unless both libraries were written by the same author or two authors who collaborate closely.

2 Likes

I expect both as the hardware is different.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.