Servo Class Reference

#include <Servo.h>

Inheritance diagram for Servo:

Inheritance graph
[legend]
Collaboration diagram for Servo:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Servo (unsigned channel)
 Servo (unsigned slot, unsigned channel)
void Set (float value)
float Get (void)
void SetAngle (float angle)
float GetAngle (void)


Detailed Description

Standard hobby style servo

Constructor & Destructor Documentation

Servo::Servo ( unsigned  channel  ) 

Constructor that assumes the default digital module.

Parameters:
channel The PWM channel on the digital module that the servo is attached to.

Servo::Servo ( unsigned  slot,
unsigned  channel 
)

Constructor that specifies the digital module.

Parameters:
slot The slot in the chassis that the digital module is plugged into.
channel The PWM channel on the digital module that the servo is attached to.


Member Function Documentation

void Servo::Set ( float  value  ) 

Set the servo position.

Servo values range from 0.0 to 1.0 that corresponds to full left to full right.

Parameters:
value Position from 0.0 to 1.0.

float Servo::Get ( void   ) 

Get the servo position.

Servo values range from 0.0 to 1.0 that corresponds to full left to full right.

Returns:
Position from 0.0 to 1.0.

void Servo::SetAngle ( float  degrees  ) 

Set the servo angle.

Assume that the servo angle is linear with respect to the PWM value (big assumption, need to test).

Parameters:
degrees The angle in degrees to set the servo.

float Servo::GetAngle ( void   ) 

Get the servo angle.

Assume that the servo angle is linear with respect to the PWM value (big assumption, need to test). s

Returns:
The angle in degrees the servo is set to.


The documentation for this class was generated from the following files:

Generated on Thu Oct 2 14:01:32 2008 for WPI Robotics Library by  doxygen 1.5.5