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
- Committer:
- UCSBRobotics
- Date:
- 2012-08-01
- Revision:
- 2:19f995979c6a
- Child:
- 3:5357104c16a6
File content as of revision 2:19f995979c6a:
#ifndef SERVO_H #define SERVO_H #include "mbed.h" class Servo { public: Servo(PinName pin, unsigned int width = 1500); void write(int width); int read(); void operator=(int width); operator int(); protected: static unsigned int numServos; static Servo *servos[]; static const unsigned int period = 20000; static Timeout refreshTimeout; Timeout servoTimeout; unsigned int pulseWidth; DigitalOut signalPin; static void refresh(); void timeout(); }; #endif // SERVO_H