How do I clear an Arduino object that is saved as an application property?

29 ビュー (過去 30 日間)
How do I clear an Arduino object that is saved as an application property? I am using the "clear" command following the documentation below:
I saved an Arduino object in an application property and I used "clear" later on in order to disconnect the device. But after that I'm still getting an error when connecting the same device in another application, saying a connection to the board already exists.

採用された回答

MathWorks Support Team
MathWorks Support Team 2021 年 9 月 15 日
The values of the properities are persistent as long as your applicaiton is open. You cannot clear those properties using "clear". Instead of using "clear", you can assign the property an empty value. For example. please try something like the command below:
app.a=[]
When that line is executed, the "delete" method of the Arduino object should be called.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by