Borrar filtros
Borrar filtros

how to send data from matlab to serial port

5 visualizaciones (últimos 30 días)
SARAH LONER
SARAH LONER el 6 de Feb. de 2020
i get r value as either 0 or 1 or 2 ... 5
i need to send this r value to serial port
i used this code
delete(instrfindall);
s = serial('COM14', 'BaudRate', 9600, 'Terminator', 'CR', 'StopBit', 1, 'Parity', 'None');
fopen(s);
fprintf(s,'%i',r)
out = fscanf(s)
but i receive output as 0*0 empty char array
can any1 help me to solve this?

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps 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!

Translated by