필터 지우기
필터 지우기

Usage of CAN blocs on Arduino UNO & MKR CAN Shield

조회 수: 1 (최근 30일)
Supun MORAKANDA GAMAGE
Supun MORAKANDA GAMAGE 2022년 5월 23일
답변: Githin George 2024년 2월 8일
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에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by