Write position of servo motor
writePosition(s,position)
example
writePosition(s,position) writes the specified value to the specified servo on the Arduino® hardware.
s
position
value
collapse all
Create servo object.
a = arduino('COM4','Uno','Libraries','Servo'); s = servo(a,'D4');
Rotate the motor to its maximum position.
writePosition(s,1)
Servo object connected to an Arduino hardware specified as an object.
Position of servo motor shaft specified as a number representing the angle from 0 to 1.
0
1
arduino | readPosition | servo
arduino
readPosition
servo
You have a modified version of this example. Do you want to open this example with your edits?