Dependents: serial_connected_mcu_nucleo serial_connected_mcu_nucleo
Diff: servo.hpp
- Revision:
- 0:54b8292756b8
- Child:
- 2:58169cf31b49
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/servo.hpp Fri Feb 26 16:09:01 2016 +0000 @@ -0,0 +1,21 @@ +#ifndef INCLUDED_MBED_STL_SERVO_H +#define INCLUDED_MBED_STL_SERVO_H + +#include "mbed.h" + +namespace mbed_stl { + +class servo{ +public: + servo(PinName pin); + void set_position(float pos); + +private: + static const float min_position_sec_; + static const float max_position_sec_; + PwmOut pwm_; +}; + +} /* namespace mbed_stl */ + +#endif