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:
|
||||
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
|
||||
|
||||
[Inline documentation example](https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example)
|
||||
|
|
|
@ -23,7 +23,7 @@ asynchronousLogstashHandler = AsynchronousLogstashHandler(
|
|||
host,
|
||||
port,
|
||||
transport=transport,
|
||||
database_path='logstash_test.db'
|
||||
database_path='logs.db'
|
||||
)
|
||||
|
||||
class StreamToLogger(object):
|
||||
|
|
|
@ -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/*
|
||||
|
|
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