How can I open a port in Matlab 2021 version?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
In the following program I need to start a connection with a COM port, but I'm getting this error on line 22, and I think is because I dont have the right syntax, can somebody tell me how should I write it in MATLAB 2021.
0 commentaires
Réponses (1)
Cris LaPierre
le 10 Nov 2021
You do not need to use fopen when using serialport.
See this page: Transition Your Code to serialport Interface
As an example, the equivalent for the following code using serial
s = serial("COM1");
s.BaudRate = 115200;
fopen(s)
is this using serialport
s = serialport("COM1",115200);
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!