Can't initiate Arduino with LCD library in MATLAB

2 ビュー (過去 30 日間)
Aditya Khambhaita
Aditya Khambhaita 2022 年 6 月 28 日
回答済み: Siraj 2023 年 9 月 29 日
I receive the following error:
>> a = arduino('/dev/cu.usbmodem11201','uno','libraries','ExampleLCD/LCDAddon');
Cannot program board Uno (/dev/cu.usbmodem11201). Please make sure the board is supported and
the port and board type are correct. For more information, see Arduino Hardware Troubleshooting.
I am using MacbookPro 2021 and I created LCD library as per the instructions on MATLAB Help Centre.
But I don't receive an error if I execute:
>> a = arduino('/dev/cu.usbmodem11201','uno')

回答 (1 件)

Siraj
Siraj 2023 年 9 月 29 日
Hi!
It seems that when you run the following code you encounter an error.
a = arduino('/dev/cu.usbmodem11201','uno','libraries','ExampleLCD/LCDAddon');
However, when you run the code without specifying libraries, don’t experience any errors.
a = arduino('/dev/cu.usbmodem11201','uno');
It appears that the issue might be related to including libraries while initializing the Arduino board. It is important to double-check the library you are using and ensure that everything is correct. If you have confirmed that there are no issues with the library, you can try the following steps to troubleshoot the problem:
  1. Please reinstall the support package for Arduino and try to program it again.
  2. Try programming the board with Arduino IDE to make sure that the board is working properly.
Additionally, please refer to the link below to troubleshoot the Arduino hardware support package:
Try executing the command with 'TraceOn' and 'ForceBuild' set to true as seen in the following:
a = arduino('/dev/cu.usbmodem11201','uno','libraries','ExampleLCD/LCDAddon','TraceOn',true,'ForceBuild',true);
This command should produce a lengthy error output, which can be used to further debug the issue.
Hope this helps.

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Arduino Hardware についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by