A class to control a model R/C servo, using a PwmOut
Fork of Servo by
Diff: Servo.h
- Revision:
- 4:fa3e4bb7a4cc
- Parent:
- 3:36b69a7ced07
--- a/Servo.h Thu Sep 02 17:34:43 2010 +0000 +++ b/Servo.h Tue Jun 21 07:45:17 2016 +0000 @@ -1,4 +1,4 @@ -/* mbed R/C Servo Library + /* mbed R/C Servo Library * Copyright (c) 2007-2010 sford, cstyles * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -81,18 +81,19 @@ * @param range Pulsewidth range from center (1.5ms) to maximum/minimum position in seconds * @param degrees Angle from centre to maximum/minimum position in degrees */ - void calibrate(float range = 0.0005, float degrees = 45.0); + void calibrate(float range = 0.0005, float degrees = 90); /** Shorthand for the write and read functions */ Servo& operator= (float percent); Servo& operator= (Servo& rhs); operator float(); -protected: +public: PwmOut _pwm; float _range; float _degrees; float _p; + float kat; }; #endif