Ece 59500 group 5 Design with embedded systems

Revision:
4:75f200525666
Parent:
2:8995c167f399
diff -r 36b69a7ced07 -r 75f200525666 Servo.cpp
--- a/Servo.cpp	Thu Sep 02 17:34:43 2010 +0000
+++ b/Servo.cpp	Mon May 06 13:03:10 2019 +0000
@@ -40,8 +40,8 @@
 }
 
 void Servo::write(float percent) {
-    float offset = _range * 2.0 * (percent - 0.5);
-    _pwm.pulsewidth(0.0015 + clamp(offset, -_range, _range));
+    float offset = _range * 2.0 * (percent-0.5);
+    _pwm.pulsewidth(0.0013 + clamp(offset, -_range, _range));
     _p = clamp(percent, 0.0, 1.0);
 }