Arduino Connection Issue with addon
13 ビュー (過去 30 日間)
古いコメントを表示
I am currently using an arduino with the motorshield v2 to drive a few stepper motors for my 3d printer. when I boot up matlab, I usually start by programming the arduino which completes successfully, I test the connection which also is successful. however, when I run my code I get this error message and cant figure out what could be causing it. I have tried redownloading the arduino addon, and clearing the object in the workspace but cant figure it out. sometimes it will persist for hours before I can get my code to run. I am even able to program successfully using the Arduino IDE, meaning i dont believe it is hardware related. Ive atatched screenshots
hoping someone can help!
0 件のコメント
回答 (1 件)
Saurav Chaudhary
2021 年 1 月 27 日
Refer the following documentation link which states how you can perform troubleshooting steps when you get the error "Unable to receive data from the target hardware".
If you continue to face the issue with IMU sensors, it is likely that it is due to the loose connections between the sensor and Arduino board. This causes the code to get stuck while performing the I2C operation.
Also, Trace messages can be used to view the commands which are being executed on the hardware board when you are using sensor functions. To view the trace messages, create the arduino object with the TraceOn parameter set as true and use sensor functions.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Arduino Hardware についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!