Cod Matlab

Embed Size (px)

Citation preview

  • 8/20/2019 Cod Matlab

    1/1

    s=serial('COM','BAUD', 9600); % Make sure the baud rate and COM !rt is

    % sa"e as in Arduin! #D$

    !en(s);

    !r "=&&0 % he r!ra" *ill e+eute &0 ti"es ,

    %-!u an hane the .aalue ! " t! inrease

    !r derease

      %the nu"ber ! e+euti!ns

    ser.alue= inut('$nter the .alue &00 t! turn O/ $D 1 &0& t! turn O22 $D

    ');

    rint(s,ser.alue); %his !""and *ill send entered .alue t!

    Arduin!

    end