NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.

Dependencies:   mbed MODI2C

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.
void initialize ()
 initialize ESC

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 initialize (  )

initialize ESC

Definition at line 14 of file Servo_PWM.cpp.

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 19 of file Servo_PWM.cpp.