Set position of a single servo.
Namespace:
AForge.Robotics.TeRKAssembly: AForge.Robotics.TeRK (in AForge.Robotics.TeRK.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
Parameters
- servo
- Type: System..::.Int32
Servo to set position for, [0, Count).
- position
- Type: System..::.Int32
Position to set for the specified servo, [0, 255].
Return Value
Returns current position of the specified servo.
Remarks
The method sets position of single Qwerk's servo, which index is specified. It is preferred to use SetPositions(array<Boolean>[]()[], array<Int32>[]()[]) for setting positions of multiple servos, which does it at once.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentOutOfRangeException | Invalid servo is specified. |
AForge..::.NotConnectedException | No connection to Qwerk or its service. |
AForge..::.ConnectionLostException | Connestion to Qwerk is lost. |