Find out range of servo rotation

3 次查看(过去 30 天)
Teo Protoulis
Teo Protoulis 2019-10-17
I am controlling a servo motor with Arduino and Matlab. The servo motor changes its position if the input values belong to the interval [0.111 0.924] by using the writePosition() function. Is there any way of finding out the range of the rotation in degrees ?

回答(1 个)

Soham Chakraborty
Soham Chakraborty 2019-10-23
Hello,
As per my understanding you want to read the shaft position in degrees.
To answer your question, you would first have to declare the range of the interval and then read th eservo position using the readPosition(s) command, where 's' is the servo object.
For example, the following documentation link provides a similar example using the FS5106B servo: https://www.mathworks.com/help/supportpkg/arduinoio/examples/control-servo-motors.html
  1 个评论
Teo Protoulis
Teo Protoulis 2019-10-23
Well, I have seen this example but what the readPosition(s) function does is that it gives you back the last value you used at the writePosition() function and unfortunately this is not enough information regarding what I am trying to achieve.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by