From 81875a2cc563595eeb1a545bb9f9d4a576f52785 Mon Sep 17 00:00:00 2001 From: Konstantin Lampalzer Date: Sat, 16 Jan 2021 23:39:41 +0100 Subject: [PATCH] Update documentation --- _sources/index.rst.txt | 16 +-- _sources/other/usage.rst.txt | 28 ++++ genindex.html | 3 +- index.html | 31 ++--- lib/Battery.html | 7 +- lib/Buzzer.html | 3 +- lib/IRSensor.html | 3 +- lib/Motor.html | 3 +- lib/Servo.html | 3 +- objects.inv | Bin 557 -> 575 bytes other/usage.html | 240 +++++++++++++++++++++++++++++++++++ search.html | 3 +- searchindex.js | 2 +- 13 files changed, 304 insertions(+), 38 deletions(-) create mode 100644 _sources/other/usage.rst.txt create mode 100644 other/usage.html diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index c207a90..2c0ae75 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -1,25 +1,21 @@ -Welcome to CompLib's documentation! -=================================== +Robo4you Competition Library +############################# .. toctree:: :maxdepth: 2 :caption: Contents: -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +CompLib is the library used in the robo4you competition 2021. -Table of Contents -^^^^^^^^^^^^^^^^^ +Contents +********* .. toctree:: :maxdepth: 5 :glob: self + other/usage lib/* diff --git a/_sources/other/usage.rst.txt b/_sources/other/usage.rst.txt new file mode 100644 index 0000000..93b2425 --- /dev/null +++ b/_sources/other/usage.rst.txt @@ -0,0 +1,28 @@ +.. _other_usage: + +Usage +###### + +.. code-block:: python + + import time + from compLib.Motor import * + + def forward(): + for port in range(0, 3): + Motor.power(port, 30); + + def backward(): + for port in range(0, 3): + Motor.power(port, -30); + + def main(): + print("hallo ich bin ein roboter beep buup") + + forward() + time.sleep(1) + backward() + time.sleep(1) + + if __name__ == '__main__': + main() \ No newline at end of file diff --git a/genindex.html b/genindex.html index 8c6c539..4b57980 100644 --- a/genindex.html +++ b/genindex.html @@ -80,7 +80,8 @@