Library is coded to control servo This library is part of my project which is built on FRDM-KL25Z and motor shield l293D v1

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ServoMotorControl.h Source File

ServoMotorControl.h

00001 #ifndef MBED_SERVO_H
00002 #define MBED_SERVO_H
00003 
00004 #include "mbed.h"
00005 
00006 class Servo
00007 {
00008 public:
00009     Servo(PinName pwm);
00010     void turn2Angle(int degree);
00011     void turn2pulse(float value);
00012     float positionRead();
00013 private:
00014     PwmOut _pwm;
00015     float _position;
00016 };
00017 
00018 #endif