Library is coded to control servo This library is part of my project which is built on FRDM-KL25Z and motor shield l293D v1
ServoMotorControl.h
- Committer:
- vtqNhi
- Date:
- 2017-09-24
- Revision:
- 0:22a971e060ed
File content as of revision 0:22a971e060ed:
#ifndef MBED_SERVO_H #define MBED_SERVO_H #include "mbed.h" class Servo { public: Servo(PinName pwm); void turn2Angle(int degree); void turn2pulse(float value); float positionRead(); private: PwmOut _pwm; float _position; }; #endif