softpwm servo

Files at this revision

API Documentation at this revision

Comitter:
highfieldsnj
Date:
Fri Nov 06 11:23:22 2020 +0000
Parent:
4:9cc96122f399
Commit message:
period

Changed in this revision

Servo.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Servo.cpp	Wed Oct 28 08:04:04 2020 +0000
+++ b/Servo.cpp	Fri Nov 06 11:23:22 2020 +0000
@@ -36,6 +36,7 @@
 }
 
 Servo::Servo(PinName pin) : _pwm(pin) {
+    _pwm.period_ms(20);
     calibrate();
     write(0.5);
 }