Andrew Russell / Servo

Dependents:   JS_1motor_20170707_ok Task_1_BallRidingbot_KeepingStationCatching_layingDown_1230 Task_2_BallRidingbot_MovingForwardCatching_backward_1230 testSSWMR_StationKeeping_200170830_OK ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Servo.h Source File

Servo.h

00001 #include "mbed.h"
00002 
00003 class Servo {
00004     public:
00005         Servo(PinName pwm32);
00006         
00007         int invert;
00008     
00009         float read(void);
00010         void write(float);
00011         void calibrate(float,float,float);
00012     
00013     private:
00014         PwmOut _pwm;
00015     
00016         float _period;
00017         float _min;
00018         float _max;
00019         float _slope;
00020         
00021         float _pos;
00022 };