Add Servo and AngularServo implementation along with docs and tests.
This is a deliberately minimal implementation designed to be added to as
we agree on new extensions (better than making an all-singing,
all-dancing version in which I get things wrong and then wind up making
backward incompatible changes to get it right :)
This commit is contained in:
Dave Jones
2016-06-15 23:34:50 +01:00
parent 20df5e4249
commit 02f7d20bc3
8 changed files with 489 additions and 29 deletions

View File

@@ -43,6 +43,20 @@ Motor
.. autoclass:: Motor(forward, backward, pwm=True)
:members: forward, backward, stop
Servo
=====
.. autoclass:: Servo(pin, initial_value=0, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000)
:inherited-members:
:members:
AngularServo
============
.. autoclass:: AngularServo(pin, initial_angle=0, min_angle=-90, max_angle=90, min_pulse_width=1/1000, max_pulse_width=2/1000, frame_width=20/1000)
:inherited-members:
:members:
Base Classes
============