Genuino Uno and servo issue on Macbook Pro


hi everybody,

i've problem genuino uno on macbook pro retina 15, i've control servo motor (savox sc-1268sg) , after have created object arduino, following code:

a = arduino('/dev/tty.usbmodem1421','uno', 'libraries', 'servo')

i create servo object with:

s = servo(a, 'd3', 'minpulseduration', 1000*10^-6, 'maxpulseduration', 2000*10^-6)

on digital pin 3 (pwm).

theoretically command:

writeposition(s, 1)

the servo should move on maxpulseduration correspond 100° instead matlab returns message:

"the host , client connection lost. make sure board plugged in , recreate arduino , related objects."

conversely if move servo pitch 0.01 initial position: 0.5, 0.51, 0.52, etc. command line, servo moves; instead if use cycle:

for i=0.5:0.01:1
  writeposition(s, i);
end

matlab returns same error message above. instead if add pause(5e-5) after writeposition(s,i) seems work.

i don't understand issue.

anyone know why happens? problem macbook correlated.

thank in advance

quote
probably problem macbook correlated.
probably problem matlab, not arduino. question belongs on matlab forum, not arduino forum.


Arduino Forum > Using Arduino > Programming Questions > Genuino Uno and servo issue on Macbook Pro


arduino

Comments

Popular posts from this blog

Valutazione Template - Joomla! Forum - community, help and support

SD Datastring Convention

First use of Arduino Uno : avrdude error on Blink uploading