As of Monday morning, so this is the code we showed at Uncraftivism.

Dependencies:   mbed

ServoMinder.h

Committer:
voidnoise
Date:
2009-12-14
Revision:
1:5d20e168f467
Parent:
0:da6a22da11a2

File content as of revision 1:5d20e168f467:

#pragma once
#include "Servo.h"

class ServoMinder
{
public:
    ServoMinder( Servo *servo );

    void moveTo( float target );
    void moveToAndWait( float target );
     void setSpeed( float speed );
     bool isMoving();
     
private:
   

    Servo *m_servo;
    float m_target;
    float m_speed;

    float m_delta;
    float m_tickTime;
    Ticker m_ticker;

    void tick();

};