Using multiple "Serial" ports of arduino mega 2560
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Naim Uddin
el 10 de Mzo. de 2020
Comentada: Naim Uddin
el 6 de En. de 2022
How to read data from Arduino Mega which is already connected with a sensor serially (For exmaple :Tx2/Rx2 or Tx3/Rx3)?
1 comentario
Ameer Hamza
el 10 de Mzo. de 2020
Which Serial port is connected to the sensor? Serial0? If not, then you can connect the Arduino to the PC with USB and read data from the serial port.
Respuesta aceptada
Gayatri Menon
el 4 de En. de 2022
Hi,
In MATLAB,
arduinoObj = arduino("COM16","Leonardo","Libraries",{'SPI','Serial','I2C'})
% For accessing TX2/RX2
serialdevObj = device(arduinoObj,'SerialPort',2)
write(serialdevObj,[88 99 65]);
Refer the following links for more info
In Simulink ,
The following examples might be helpful for you
Thanks
Gayatri
Más respuestas (0)
Ver también
Categorías
Más información sobre Modeling en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!