App Designer and Arduino
Ältere Kommentare anzeigen
Hi,
I am designing an interface in the App Designer. I have an Arduino board connected to some sensors. I would like to be able to run the interface multiple times, but right now I run it once perfectly and when I click run again it tells me I have an existing connection at my COM port and I need to clear it. I am unsure how to do this as I am very new to app designer! Any help would be greatly appreciated!
Thanks!
4 Kommentare
Asad Mirza
am 20 Feb. 2019
Mind posting some of app designer code for us?
I suspect what is happening is you're trying to connect to the arduino each time you say click a button to send a signal or something. What you should do instead is connect to the arduino once and then when you click the button to do something have the button code only send a signal rather than try to connect to the arduino.
I'd like to help more but I would need to see the code as it is first.
Allison McCrady
am 20 Feb. 2019
Mohammed Yakoob
am 2 Sep. 2024
Hello dear You can use a= arduino(com, Uno); For example to connect and in the another callback a=[]; to clear the port for new connection.
Mohammed Yakoob
am 19 Jan. 2025
Verschoben: Walter Roberson
am 19 Jan. 2025
Hello, I'm facing in problem that the internal buffers is fully and need to clear it, so how I can do this step when I am using arduino () class?
Akzeptierte Antwort
Weitere Antworten (2)
Kihak Lee
am 28 Dez. 2019
0 Stimmen
Dear Asad Mirza
I tested your attached files(Arduino_Ex.mlapp) several times. There is a problem in disconnect button.
When push disconnect button, error is happend. I can not fix it.
Plese check your code!
thanks
Mohammed Yakoob
am 19 Jan. 2025
0 Stimmen
Hello, I'm facing in problem that the internal buffers is fully and need to clear it, so how I can do this step when I am using arduino () class?
Kategorien
Mehr zu MATLAB Support Package for Arduino Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
