From d555d55b2ca8b76831c720c2f0d2cec2370ea8c4 Mon Sep 17 00:00:00 2001 From: Konstantin Lampalzer Date: Sat, 16 Jan 2021 01:55:10 +0100 Subject: [PATCH] Update documentation --- _sources/lib/Battery.rst.txt | 20 ++++++++++++++++++-- _sources/lib/Buzzer.rst.txt | 22 ++++++++++++++++++++-- _sources/lib/Motor.rst.txt | 20 ++++++++++++++++++-- index.html | 27 ++++++++++++++++++++++++--- lib/Battery.html | 23 ++++++++++++++++++++++- lib/Buzzer.html | 26 +++++++++++++++++++++++++- lib/Motor.html | 24 +++++++++++++++++++++++- searchindex.js | 2 +- 8 files changed, 151 insertions(+), 13 deletions(-) diff --git a/_sources/lib/Battery.rst.txt b/_sources/lib/Battery.rst.txt index c9505fb..306730e 100644 --- a/_sources/lib/Battery.rst.txt +++ b/_sources/lib/Battery.rst.txt @@ -1,7 +1,23 @@ .. _lib_battery: Battery -======= +######## + +Class Documentation +******************** .. autoclass:: compLIB.Battery.Battery - :members: \ No newline at end of file + :members: + + +Examples +********* + +Printing percentage +==================== + +.. code-block:: python + + from compLIB.Battery import Battery + + print(Battery.percent()) \ No newline at end of file diff --git a/_sources/lib/Buzzer.rst.txt b/_sources/lib/Buzzer.rst.txt index 8a1894a..e5f7790 100644 --- a/_sources/lib/Buzzer.rst.txt +++ b/_sources/lib/Buzzer.rst.txt @@ -1,7 +1,25 @@ .. _lib_buzzer: Buzzer -======= +####### + +Class Documentation +******************** .. autoclass:: compLIB.Buzzer.Buzzer - :members: \ No newline at end of file + :members: + +Examples +********* + +Turning buzzer on and off +========================== + +.. code-block:: python + + import time + from compLIB.Buzzer import Buzzer + + Buzzer.set(True) + time.sleep(1) + Buzzer.set(False) \ No newline at end of file diff --git a/_sources/lib/Motor.rst.txt b/_sources/lib/Motor.rst.txt index 2d26d06..f5b9d09 100644 --- a/_sources/lib/Motor.rst.txt +++ b/_sources/lib/Motor.rst.txt @@ -1,7 +1,23 @@ .. _lib_motor: Motor -===== +###### + +Class Documentation +******************** .. autoclass:: compLIB.Motor.Motor - :members: \ No newline at end of file + :members: + +Examples +********* + +Driving straight (maybe) +========================= + +.. code-block:: python + + from compLIB.Motor import Motor + + for port in range(0, 4): + Motor.power(port, 50) \ No newline at end of file diff --git a/index.html b/index.html index 05ee3eb..d77cbd3 100644 --- a/index.html +++ b/index.html @@ -169,10 +169,31 @@
diff --git a/lib/Battery.html b/lib/Battery.html index 3120d6d..73a7a1f 100644 --- a/lib/Battery.html +++ b/lib/Battery.html @@ -83,7 +83,14 @@