My fully self designed first stable working Quadrocopter Software.

Dependencies:   mbed

Dependents:   fluy343

Embed: (wiki syntax)

« Back to documentation index

Servo_PWM Class Reference

Servo_PWM Class Reference

Class to control a servo by using PWM. More...

#include <Servo_PWM.h>

Public Member Functions

 Servo_PWM (PinName Pin, int frequency)
 Create a new Servo object on any PWM pin.
void SetPosition (int position)
 Change the position of the servo.
void operator= (int position)
 Operator for confortable positioning.

Detailed Description

Class to control a servo by using PWM.

Definition at line 11 of file Servo_PWM.h.


Constructor & Destructor Documentation

Servo_PWM ( PinName  Pin,
int  frequency 
)

Create a new Servo object on any PWM pin.

Parameters:
PinPin on mbed to connect servo to

Definition at line 4 of file Servo_PWM.cpp.


Member Function Documentation

void operator= ( int  position )

Operator for confortable positioning.

Parameters:
positionsee SetPosition

Definition at line 23 of file Servo_PWM.cpp.

void SetPosition ( int  position )

Change the position of the servo.

Position in us

Parameters:
positionThe new value of the servos position between 0 and 1000 (gets 1000-2000) (us)

Definition at line 15 of file Servo_PWM.cpp.