Provides access to Qwerk's servos' controllers.

Namespace:  AForge.Robotics.TeRK
Assembly:  AForge.Robotics.TeRK (in AForge.Robotics.TeRK.dll) Version: 2.2.3.0 (2.2.3.0)

Syntax

C#
public class Servos

Remarks

The class allows to manipulate Qwerk's servos. The total number of available servos equals to Count.

Each servo has logical and physical positions, which may or may not be equal. Both positions may vary in the [0, 255] range. Physical and logical positions are equal, when servo's physical moving bound (range) is set to [0, 255] (see SetBound(Int32, IntRange)). In this case setting servo's logical position with SetPosition(Int32, Int32) method results in servo's physical moving in the [0, 255] range. However, of physical bound is set to [10, 20], for example, then physically the servo will move only in this range. But logical position is still may be set in [0, 255] range, which is mapped to physical range.

Sample usage:

CopyC#
// get Qwerk's servos service
Qwerk.Servos servos = qwerk.GetServosService( );
// stop all servos
servos.StopServos( );
// set 0th servo's bounds
servos.SetBound( 0, new IntRange( 10, 100 ) );
// set servo's position
servos.SetPosition( 0, 50 );
// ...

// get 0th servo's position
int currentPosition = servos.GetPosition( 0 );

Inheritance Hierarchy

System..::.Object
  AForge.Robotics.TeRK..::.Qwerk..::.Servos

See Also