Return true if the servo is in motion.
const servo = new VIAM.ServoClient(machine, 'my_servo');
const moving = await servo.isMoving();
console.log('Moving:', moving);
For more information, see Servo API.
Move the servo by a given angle in degrees.
Optional
extra: Structconst servo = new VIAM.ServoClient(machine, 'my_servo');
// Move the servo from its origin to the desired angle of 10 degrees
await servo.move(10);
// Move the servo from its origin to the desired angle of 90 degrees
await servo.move(90);
For more information, see Servo API.
Stop the servo.
Optional
extra: Structconst servo = new VIAM.ServoClient(machine, 'my_servo');
// Move the servo from its origin to the desired angle of 10 degrees
await servo.move(10);
// Stop the servo. It is assumed that the servo stops moving immediately
await servo.stop();
For more information, see Servo API.
Represents a physical servo.