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

@ -7,6 +7,15 @@
Need dependencies: Need dependencies:
https://github.com/Freenove/Freenove_RPI_WS281x_Python https://github.com/Freenove/Freenove_RPI_WS281x_Python
# Dependencies
## Building documentation
```
pip install sphinx-rtd-theme
```
* [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
# Writing docs # Writing docs
[Inline documentation example](https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example) [Inline documentation example](https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example)

View file

@ -23,7 +23,7 @@ asynchronousLogstashHandler = AsynchronousLogstashHandler(
host, host,
port, port,
transport=transport, transport=transport,
database_path='logstash_test.db' database_path='logs.db'
) )
class StreamToLogger(object): class StreamToLogger(object):

View file

@ -1,25 +1,21 @@
Welcome to CompLib's documentation! Robo4you Competition Library
=================================== #############################
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
Indices and tables CompLib is the library used in the robo4you competition 2021.
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Table of Contents Contents
^^^^^^^^^^^^^^^^^ *********
.. toctree:: .. toctree::
:maxdepth: 5 :maxdepth: 5
:glob: :glob:
self self
other/usage
lib/* 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()