Arduino Support Package CAN Receiver not working
1 次查看(过去 30 天)
显示 更早的评论
I'm running MATLAB R2023a with Windows 10, and I seem to be running into an issue that when I take battery voltage from voltage sensor as input into the analog pin of Arduino Mega 2560 with MCP2515 Sunflower CAN Shield V3 mounted on it, and transmit using the CAN Transmit block of Simulink Support Package for Arduino, the signal is transmitted in the uint8 format. But at the data port of the CAN Receive block, I receive no output. However, both blocks have the Message ID and Message Length.
I have done the same task using Arduino IDE and it was working. Can anyone please help in this regard where things are getting wrong.
Also mention here that Arduino Uno does not work with MCP2515 CAN Shield, it shows an error that size of the program has exceeded from the memory of the board.
Thank you.
回答(1 个)
Pramil
2024-8-23
I had a similar issue working with “Arduino Due” and “MCP2515-based CAN” shield, what worked for me was:
- Using a new “CAN shield”. You can use the one you have but if it does not works, try using another “CAN shield”.
- Following these steps to deploy:
- Must connect “Arduino” before the “CAN” is activated.
- Then deploy Simulink.
- After that turn on the machine.
Not following the above steps was resulting in Arduino to timeout.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!