Send values in a variable from Matlab to arduino using serial communications

Dear all, may I know how to send a values (numbers) in a variables from MATLAB to ARDUINO.
Below is my coding but error arise.
%Compute Standard Deviation of x and send it to serial
sdA = std(x)
s = serial('COM6');
s.Baudrate = 9600;
s.Terminator = 'CR';
%open serial port
fopen(s);
%send value '100' else send 101
fprintf(s,'sdA');
fscanf(s);
fclose(s);

Réponses (0)

Catégories

En savoir plus sur MATLAB Support Package for Arduino Hardware dans Centre d'aide et File Exchange

Question posée :

le 17 Avr 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by