Update documentation

This commit is contained in:
Konstantin Lampalzer 2021-01-16 23:39:41 +01:00
parent f7a7dd37ed
commit 81875a2cc5
No known key found for this signature in database
GPG key ID: 9A60A522835A2AD9
13 changed files with 304 additions and 38 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()

View file

@ -80,7 +80,8 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>

View file

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to CompLibs documentation! &mdash; CompLib 0.0.1 documentation</title>
<title>Robo4you Competition Library &mdash; CompLib 0.0.1 documentation</title>
@ -35,7 +35,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Battery" href="lib/Battery.html" />
<link rel="next" title="Usage" href="other/usage.html" />
</head>
<body class="wy-body-for-nav">
@ -81,7 +81,8 @@
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
@ -133,7 +134,7 @@
<li><a href="#" class="icon icon-home"></a> &raquo;</li>
<li>Welcome to CompLibs documentation!</li>
<li>Robo4you Competition Library</li>
<li class="wy-breadcrumbs-aside">
@ -152,23 +153,17 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="welcome-to-complib-s-documentation">
<h1>Welcome to CompLibs documentation!<a class="headerlink" href="#welcome-to-complib-s-documentation" title="Permalink to this headline"></a></h1>
<div class="section" id="robo4you-competition-library">
<h1>Robo4you Competition Library<a class="headerlink" href="#robo4you-competition-library" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
<div class="section" id="table-of-contents">
<h2>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline"></a></h2>
<p>CompLib is the library used in the robo4you competition 2021.</p>
<div class="section" id="contents">
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Battery.html">Battery</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lib/Battery.html#class-documentation">Class Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/Battery.html#examples">Examples</a><ul>
@ -208,7 +203,7 @@
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="lib/Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
</div>

View file

@ -36,7 +36,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Buzzer" href="Buzzer.html" />
<link rel="prev" title="Welcome to CompLibs documentation!" href="../index.html" />
<link rel="prev" title="Usage" href="../other/usage.html" />
</head>
<body class="wy-body-for-nav">
@ -82,7 +82,8 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Battery</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#class-documentation">Class Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
@ -209,7 +210,7 @@
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="Welcome to CompLibs documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Usage" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>

View file

@ -82,7 +82,8 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Buzzer</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#class-documentation">Class Documentation</a></li>

View file

@ -82,7 +82,8 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Infrared Sensor</a></li>

View file

@ -82,7 +82,8 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>

View file

@ -81,7 +81,8 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="IRSensor.html">Infrared Sensor</a></li>

Binary file not shown.

240
other/usage.html Normal file
View file

@ -0,0 +1,240 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Usage &mdash; CompLib 0.0.1 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Battery" href="../lib/Battery.html" />
<link rel="prev" title="Robo4you Competition Library" href="../index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/IRSensor.html">Infrared Sensor</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lib/Servo.html">Servo</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">CompLib</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Usage</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/other/usage.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="usage">
<span id="other-usage"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h1>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="o">*</span>
<span class="k">def</span> <span class="nf">forward</span><span class="p">():</span>
<span class="k">for</span> <span class="n">port</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">):</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="n">port</span><span class="p">,</span> <span class="mi">30</span><span class="p">);</span>
<span class="k">def</span> <span class="nf">backward</span><span class="p">():</span>
<span class="k">for</span> <span class="n">port</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">):</span>
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="n">port</span><span class="p">,</span> <span class="o">-</span><span class="mi">30</span><span class="p">);</span>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;hallo ich bin ein roboter beep buup&quot;</span><span class="p">)</span>
<span class="n">forward</span><span class="p">()</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">backward</span><span class="p">()</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
<span class="n">main</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../lib/Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="../index.html" class="btn btn-neutral float-left" title="Robo4you Competition Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2021, robo4you
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

View file

@ -82,7 +82,8 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html">Robo4you Competition Library</a></li>
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Battery.html">Battery</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/Buzzer.html">Buzzer</a></li>
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>

View file

@ -1 +1 @@
Search.setIndex({docnames:["index","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst"],objects:{"compLib.Battery":{Battery:[1,0,1,""]},"compLib.Battery.Battery":{percent:[1,1,1,""]},"compLib.Buzzer":{Buzzer:[2,0,1,""]},"compLib.Buzzer.Buzzer":{set:[2,1,1,""]},"compLib.IRSensor":{IRSensor:[3,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[3,1,1,""],bottom_middle:[3,1,1,""],bottom_right:[3,1,1,""],top_left_percent:[3,1,1,""],top_right_percent:[3,1,1,""]},"compLib.Motor":{Motor:[4,0,1,""]},"compLib.Motor.Motor":{all_off:[4,1,1,""],power:[4,1,1,""]},"compLib.Servo":{Servo:[5,0,1,""]},"compLib.Servo.Servo":{set_position:[5,1,1,""],setup_position:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[1,3,4],"class":[0,3,5],"import":[1,2,4],"int":[1,3,4,5],"return":[1,3],"static":[1,2,3,4,5],"true":[2,3],Used:[1,2],access:3,all:4,all_off:4,angl:5,batteri:0,between:[1,3,4,5],bool:[2,3],bottom:3,bottom_left:3,bottom_middl:3,bottom_right:3,buzzer:0,channel:5,complib:[1,2,3,4,5],connect:[4,5],control:[4,5],detect:3,differ:3,drive:0,dure:5,exampl:0,fals:2,from:[1,2,4],get:[1,3],index:0,infrar:0,interact:[1,2],irsensor:3,left:[3,4],max:4,mayb:0,middl:3,modul:0,motor:0,off:0,page:0,paramet:[2,4,5],percent:[1,4],percentag:[0,3,4],port:[4,5],posit:5,power:4,print:0,process:5,rang:4,right:[3,4],robot:[3,5],search:0,sensor:0,servo:0,set:[2,4,5],set_posit:5,setup:5,setup_posit:5,signal:3,sleep:2,specifi:4,speed:4,statu:3,straight:0,time:2,top:[3,4],top_left_perc:3,top_right_perc:3,turn:[0,4],type:[1,3],used:[4,5],which:4},titles:["Welcome to CompLib\u2019s documentation!","Battery","Buzzer","Infrared Sensor","Motor","Servo"],titleterms:{"class":[1,2,4],batteri:1,buzzer:2,complib:0,content:0,document:[0,1,2,4],drive:4,exampl:[1,2,4],indic:0,infrar:3,mayb:4,motor:4,off:2,percentag:1,print:1,sensor:3,servo:5,straight:4,tabl:0,turn:2,welcom:0}})
Search.setIndex({docnames:["index","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo","other/usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst","other/usage.rst"],objects:{"compLib.Battery":{Battery:[1,0,1,""]},"compLib.Battery.Battery":{percent:[1,1,1,""]},"compLib.Buzzer":{Buzzer:[2,0,1,""]},"compLib.Buzzer.Buzzer":{set:[2,1,1,""]},"compLib.IRSensor":{IRSensor:[3,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[3,1,1,""],bottom_middle:[3,1,1,""],bottom_right:[3,1,1,""],top_left_percent:[3,1,1,""],top_right_percent:[3,1,1,""]},"compLib.Motor":{Motor:[4,0,1,""]},"compLib.Motor.Motor":{all_off:[4,1,1,""],power:[4,1,1,""]},"compLib.Servo":{Servo:[5,0,1,""]},"compLib.Servo.Servo":{set_position:[5,1,1,""],setup_position:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[1,3,4],"2021":0,"class":[0,3,5],"import":[1,2,4,6],"int":[1,3,4,5],"return":[1,3],"static":[1,2,3,4,5],"true":[2,3],Used:[1,2],__main__:6,__name__:6,access:3,all:4,all_off:4,angl:5,backward:6,batteri:0,beep:6,between:[1,3,4,5],bin:6,bool:[2,3],bottom:3,bottom_left:3,bottom_middl:3,bottom_right:3,buup:6,buzzer:0,channel:5,complib:[0,1,2,3,4,5,6],connect:[4,5],control:[4,5],def:6,detect:3,differ:3,document:0,drive:0,dure:5,ein:6,exampl:0,fals:2,forward:6,from:[1,2,4,6],get:[1,3],hallo:6,ich:6,infrar:0,interact:[1,2],irsensor:3,left:[3,4],main:6,max:4,mayb:0,middl:3,motor:[0,6],off:0,paramet:[2,4,5],percent:[1,4],percentag:[0,3,4],port:[4,5,6],posit:5,power:[4,6],print:[0,6],process:5,rang:[4,6],right:[3,4],robot:[3,5,6],sensor:0,servo:0,set:[2,4,5],set_posit:5,setup:5,setup_posit:5,signal:3,sleep:[2,6],specifi:4,speed:4,statu:3,straight:0,time:[2,6],top:[3,4],top_left_perc:3,top_right_perc:3,turn:[0,4],type:[1,3],usag:0,used:[0,4,5],which:4},titles:["Robo4you Competition Library","Battery","Buzzer","Infrared Sensor","Motor","Servo","Usage"],titleterms:{"class":[1,2,4],batteri:1,buzzer:2,competit:0,content:0,document:[1,2,4],drive:4,exampl:[1,2,4],infrar:3,librari:0,mayb:4,motor:4,off:2,percentag:1,print:1,robo4y:0,sensor:3,servo:5,straight:4,turn:2,usag:6}})