servo publish

Dependents:   TurtleBot_v01 TurtleBot_with_AHS

Fork of Servo by Jasper Denkers

Servo.h

Committer:
jdenkers
Date:
2010-10-17
Revision:
0:30b972d2dcec
Child:
1:352133517ccc

File content as of revision 0:30b972d2dcec:

#ifndef MBED_SERVO_H
#define MBED_SERVO_H

#include "mbed.h"

class Servo {
  
public:
    Servo(PinName Pin);
    void SetPosition(int NewPos);
    void Enable(int StartPos, int Period);
    void Disable();

private:
    void StartPulse();
    void EndPulse();

    int Position;
    DigitalOut ServoPin;
    Ticker Pulse;
    Timeout PulseStop;
};

#endif