Documentation

This commit is contained in:
Konstantin Lampalzer 2021-01-16 23:41:39 +01:00
parent 2cac75fc9c
commit 3b18b0a66c
No known key found for this signature in database
GPG key ID: 9A60A522835A2AD9
4 changed files with 44 additions and 11 deletions

View file

@ -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/*

View file

@ -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()