Documentation
This commit is contained in:
parent
2cac75fc9c
commit
3b18b0a66c
4 changed files with 44 additions and 11 deletions
|
@ -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)
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -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/*
|
||||||
|
|
28
docs/source/other/usage.rst
Normal file
28
docs/source/other/usage.rst
Normal 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()
|
Reference in a new issue