Azzera filtri
Azzera filtri

Usage of CAN blocs on Arduino UNO & MKR CAN Shield

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (1)

Githin George
Githin George il 8 Feb 2024
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.

Categorie

Scopri di più su Arduino Hardware in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by