Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Servo.h
00001 #ifndef MBED_SERVO_H 00002 #define MBED_SERVO_H 00003 00004 #include "mbed.h" 00005 00006 #define MAX /* Fill in the blank */ 00007 #define MID /* Fill in the blank */ 00008 00009 class Servo 00010 { 00011 private: 00012 DigitalOut m_PWM; 00013 Ticker m_period_ticker; 00014 Timeout m_width_timeout; 00015 float m_degree; 00016 float m_width; 00017 00018 void setPeriod(); 00019 void setWidth(); 00020 public: 00021 Servo(PinName IN); 00022 void update(float degree); 00023 float getDegree(); 00024 }; 00025 00026 #endif
Generated on Tue Jul 12 2022 23:31:46 by
