Not able to send CAN messages-Need Help

How can I connect 2 mcp2515 boards to one arduino?

use code tags </> when uploading code it makes it more readable
upload a schematic of your setup?
how many CAN devices are there? what are they?
have you termination resistors?
I find a USB-CAN dongle for a PC useful when testing and debugging CAN networks
have a look at error-sending-data-to-can - may give you some ideas

Print the success/fail return code from the various mcp2515 methods.
Currently your code assumes that every step works, but that may not be the case.

Post a schematic of your system showing both ends unless they are identical, a frizzy picture is useless. Explain how the bus is terminated and how your system is powered. Be sure both can nodes are connected to the same ground, this makes debugging much easier. Try a slower baud rate to start. Post a link to technical information on your CAN-shield, there are many different items with the same name. Check the crystals on the MCP2515's are they the same. Use the sample send and receive included with the library, if they do not work do not expect your code to work. Let us know how you do.

Hi, @suryasen
Welcome to the forum.

You need to place your code in code tags to make it easier to read and copy to try.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

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