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.
Servo_PWM/Servo_PWM.h
- Committer:
- maetugr
- Date:
- 2012-11-27
- Revision:
- 26:96a072233d7a
- Parent:
- 15:753c5d6a63b3
- Child:
- 29:8b7362a2ee14
File content as of revision 26:96a072233d7a:
// by MaEtUgR #ifndef SERVO_PWM_H #define SERVO_PWM_H #include "mbed.h" /** Class to control a servo by using PWM */ class Servo_PWM { public: /** Create a new Servo object on any PWM pin * * @param Pin Pin on mbed to connect servo to */ Servo_PWM(PinName Pin); /** Change the position of the servo. Position in us * * @param position The new value of the servos position between 0 and 1000 (gets 1000-2000) (us) */ void SetPosition(int position); /** Operator for confortable positioning * * @param position see SetPosition */ void operator=(int position); /** initialize ESC */ void initialize(); private: PwmOut ServoPin; }; #endif