send text(M1_RIGHT) to usb

1 view (last 30 days)
mo ma
mo ma on 5 May 2013
hi, I want to start a motor with usb driver that I made it, it works when I send text with Bascom but with matlab dose not work; this is my m file that i write for start motor: s=serial('COM2') fopen(s) fprintf(s,'M1_RIGHT') what can I do?

Accepted Answer

Walter Roberson
Walter Roberson on 5 May 2013
You probably need to set the speed; you might also need to set the line terminator.
  2 Comments
mo ma
mo ma on 6 May 2013
I write this command s = serial('COM2', 'BaudRate', 2400, 'DataBits',8,'Parity','None','Stopbit',1); but it does not work!!!
Walter Roberson
Walter Roberson on 6 May 2013
Is there an error message?

Sign in to comment.

More Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!