App Designer and Arduino
Afficher commentaires plus anciens
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 commentaires
Asad Mirza
le 20 Fév 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
le 20 Fév 2019
Mohammed Yakoob
le 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
le 19 Jan 2025
Déplacé(e) : Walter Roberson
le 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?
Réponse acceptée
Plus de réponses (2)
Kihak Lee
le 28 Déc 2019
0 votes
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
le 19 Jan 2025
0 votes
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?
Catégories
En savoir plus sur MATLAB Support Package for Arduino Hardware dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
