Usage of CAN blocs on Arduino UNO & MKR CAN Shield

1 次查看(过去 30 天)
Hello,
In my project i have to use CAN blocs to communicate between raspberry pi 3 & arduino uno.
I have some troubles by using the demo code here's the following result :
Here's the following error that i have (you can find attached to this post.
Thanks in advance for your help.

回答(1 个)

Githin George
Githin George 2024-2-8
Hello,
It is my understanding that you are trying to implement the example for CAN transmission with an Arduino UNO. I’m assuming that you are following the example given below to setup your hardware and configuration properties.
Looking at the build log, it is apparent that the data memory in the Arduino is being overflowed as it exceeds 2KB, which is the limit for the Arduino UNO. If the hardware setup is indeed in line with the example, the probable cause would be the definition of the Block Parameter “Message ID”. According to the documentation for CAN transmit block, for the parameter “Message ID” use "hex2dec(' ')" to convert the entry if the value is entered as hexadecimal. In this case use "hex2dec(‘0x14’)" as normal usage may be the cause of the unexpected behavior.
You could also try the same example with a supported hardware board which offers more flexibility in terms of data storage.
I hope this helps.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by