help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave-Arduino-Servo


From: John Donoghue
Subject: Re: Octave-Arduino-Servo
Date: Sat, 1 Dec 2018 09:01:38 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 12/1/18 8:04 AM, Vicent Borras wrote:
Thank you very much again. I've been able to move the servo!!
 But I'm receiving an error message and I have to restart the arduino board every time, disconnecting the USB cable.  If I press the reset arduino button, it doesn't work.
It works once and  I receive an error message when the servo is defined. After that I have to disconnect it again.
It's the same doing small or big movements.
-----
a=10
ar = arduino();
b=20
myServo = servo(ar, "d9", "minpulseduration", 1.0e-3,  "maxpulseduration", 2.0e-3);
c=30
writePosition (myServo, 0);
d=40
position = readPosition (myServo)
pause(2);
writePosition (myServo, 1);
position = readPosition (myServo)
---------
>> provaArduino3

a =  10
b =  20
warning: onCleanup: error caught while executing cleanup function:
srl_timeout: error setting timeout...
c =  30
d =  40
position = 0
position =  1
______
If I don't disconnect the board It doesn't work and I don't recieve the error message.
>> provaArduino3

a =  10
b =  20
c =  30
d =  40
position = 0
position =  1





Disconnecting the board will put it out of sync in terms of any configuration it has done on the board, so perhaps isnt surprising that it shows an error at the case.


Modify your code to:


a=10
ar = arduino();
b=20
myServo = servo(ar, "d9", "minpulseduration", 1.0e-3,  "maxpulseduration", 2.0e-3);
c=30
writePosition (myServo, .5);
d=40
position = readPosition (myServo)
pause(2);
writePosition (myServo, .8);
position = readPosition (myServo)



And try it - I am still thinking you are possibly having issues from drawing too much power with the servo with the large movements and causing the board to reset.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]