We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db44ac2 commit a55e5cfCopy full SHA for a55e5cf
XRPLib/servo.py
@@ -25,12 +25,12 @@ def __init__(self, signal_pin:int):
25
# Initialize base frequency for the PWM
26
self._servo.freq(50)
27
self.MICROSEC_PER_DEGREE: int = 10000
28
- self.LOW_ANGLE_OFFSET: int = 1000000
+ self.LOW_ANGLE_OFFSET: int = 500000
29
30
- def set_position(self, degrees: float):
+ def set_angle(self, degrees: float):
31
"""
32
Sets the angle of the servo
33
- :param degrees: The angle to set the servo to [0,180]
+ :param degrees: The angle to set the servo to [0,200]
34
:ptype degrees: float
35
36
self._servo.duty_ns(int(degrees * self.MICROSEC_PER_DEGREE + self.LOW_ANGLE_OFFSET))
0 commit comments