Update documentation

This commit is contained in:
Joel 2021-01-17 04:35:51 +01:00
parent 0dbfc5fe6b
commit aa6fb2fc8b
No known key found for this signature in database
GPG key ID: BDDDBECD0808290E
17 changed files with 776 additions and 47 deletions

View file

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5fb11da93cdb0f49bc97733fbb9cadaf
config: 485364fc47e6585839eb0832cd879672
tags: 645f666f9bcd5a90fca523b33c5a78b7

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,67 @@
.. _lib_api:
Api
=====
Seeding
********
.. autoclass:: compLib.Api.Seeding
:members:
Double Elimination
*******************
.. autoclass:: compLib.Api.DoubleElim
:members:
Position
*********
.. autoclass:: compLib.Api.Position
:members:
Examples
*********
Calling Seeding API
---------------------
.. code-block:: python
from compLib.Api import Seeding
park = Seeding.get_park()
print(f"I should move to parking position: {park}")
if park == 0:
print(f"I can't move to this position yet :(")
elif park == 1:
print(f"Moving to position 1!")
# drive to parking position using Motors module...
print(f"Now hopefully at position 1")
# drive back using Motors module...
elif park == 2:
# do something similar to park == 1..
elif park == 3:
# do something similar to park == 1..
success = Seeding.pay_park()
if success:
print(f"We scored some points!")
else:
print(f"We failed :(")
Calling Double Elimination API
----------------------------------
.. code-block:: python
from compLib.Api import DoubleElim
position = DoubleElim.get_position()
print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}")
goal = DoubleElim.get_goal()
print(f"Goal is at: x={goal.x}, y={goal.y}")

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

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.0.1',
VERSION: '0.0.2',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

View file

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; CompLib 0.0.1 documentation</title>
<title>Index &mdash; CompLib 0.0.2 documentation</title>
@ -83,7 +83,9 @@
<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/Api.html">Api</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>
@ -160,6 +162,8 @@
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#P"><strong>P</strong></a>
@ -193,6 +197,32 @@
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.DoubleElim">DoubleElim (class in compLib.Api)</a>
</li>
</ul></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_goal">get_goal() (compLib.Api.DoubleElim static method)</a>
</li>
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_items">get_items() (compLib.Api.DoubleElim static method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_opponent">get_opponent() (compLib.Api.DoubleElim static method)</a>
</li>
<li><a href="lib/Api.html#compLib.Api.Seeding.get_park">get_park() (compLib.Api.Seeding static method)</a>
</li>
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_position">get_position() (compLib.Api.DoubleElim static method)</a>
</li>
</ul></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
@ -212,10 +242,14 @@
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.Seeding.pay_park">pay_park() (compLib.Api.Seeding static method)</a>
</li>
<li><a href="lib/Battery.html#compLib.Battery.Battery.percent">percent() (compLib.Battery.Battery static method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.Position">Position (class in compLib.Api)</a>
</li>
<li><a href="lib/Motor.html#compLib.Motor.Motor.power">power() (compLib.Motor.Motor static method)</a>
</li>
</ul></td>
@ -224,6 +258,8 @@
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="lib/Api.html#compLib.Api.Seeding">Seeding (class in compLib.Api)</a>
</li>
<li><a href="lib/Servo.html#compLib.Servo.Servo">Servo (class in compLib.Servo)</a>
</li>
<li><a href="lib/Buzzer.html#compLib.Buzzer.Buzzer.set">set() (compLib.Buzzer.Buzzer static method)</a>
@ -233,6 +269,8 @@
<li><a href="lib/Servo.html#compLib.Servo.Servo.set_position">set_position() (compLib.Servo.Servo static method)</a>
</li>
<li><a href="lib/Servo.html#compLib.Servo.Servo.setup_position">setup_position() (compLib.Servo.Servo static method)</a>
</li>
<li><a href="lib/Api.html#compLib.Api.Seeding.simon_says">simon_says() (compLib.Api.Seeding static method)</a>
</li>
</ul></td>
</tr></table>

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.2 documentation</title>
@ -38,7 +38,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">
@ -84,7 +84,9 @@
<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/Api.html">Api</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>
@ -138,7 +140,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">
@ -157,23 +159,28 @@
<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/Api.html">Api</a><ul>
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#seeding">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#double-elimination">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#position">Position</a></li>
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="lib/Api.html#calling-seeding-api">Calling Seeding API</a></li>
<li class="toctree-l3"><a class="reference internal" href="lib/Api.html#calling-double-elimination-api">Calling Double Elimination API</a></li>
</ul>
</li>
</ul>
</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>
@ -211,7 +218,7 @@
</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" aria-hidden="true"></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" aria-hidden="true"></span></a>
</div>
<hr/>

343
html/lib/Api.html Normal file
View file

@ -0,0 +1,343 @@
<!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>Api &mdash; CompLib 0.0.2 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="Battery.html" />
<link rel="prev" title="Usage" href="../other/usage.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"> 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"><a class="reference internal" href="../other/usage.html">Usage</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Api</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#seeding">Seeding</a></li>
<li class="toctree-l2"><a class="reference internal" href="#double-elimination">Double Elimination</a></li>
<li class="toctree-l2"><a class="reference internal" href="#position">Position</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#calling-seeding-api">Calling Seeding API</a></li>
<li class="toctree-l3"><a class="reference internal" href="#calling-double-elimination-api">Calling Double Elimination API</a></li>
</ul>
</li>
</ul>
</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>
<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li>
<li class="toctree-l1"><a class="reference internal" href="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>Api</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/lib/Api.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="api">
<span id="lib-api"></span><h1>Api<a class="headerlink" href="#api" title="Permalink to this headline"></a></h1>
<div class="section" id="seeding">
<h2>Seeding<a class="headerlink" href="#seeding" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLib.Api.Seeding">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">Seeding</code><a class="headerlink" href="#compLib.Api.Seeding" title="Permalink to this definition"></a></dt>
<dd><p>Class used for communicating with seeding api</p>
<dl class="py method">
<dt id="compLib.Api.Seeding.get_park">
<em class="property">static </em><code class="sig-name descname">get_park</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.Api.Seeding.get_park" title="Permalink to this definition"></a></dt>
<dd><p>Get a parkingsapce from the api.
:return: An int between 0 and 3</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Api.Seeding.pay_park">
<em class="property">static </em><code class="sig-name descname">pay_park</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; bool<a class="headerlink" href="#compLib.Api.Seeding.pay_park" title="Permalink to this definition"></a></dt>
<dd><p>Pay for parking.
:return: True if successful, False if not successful</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Api.Seeding.simon_says">
<em class="property">static </em><code class="sig-name descname">simon_says</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; int<a class="headerlink" href="#compLib.Api.Seeding.simon_says" title="Permalink to this definition"></a></dt>
<dd><p>Get next simon says zone from the api.
:return: An int between 0 and 3 or -1 after making this request 5 times.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="double-elimination">
<h2>Double Elimination<a class="headerlink" href="#double-elimination" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLib.Api.DoubleElim">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">DoubleElim</code><a class="headerlink" href="#compLib.Api.DoubleElim" title="Permalink to this definition"></a></dt>
<dd><p>Class used for communicating with double elimination api</p>
<dl class="py method">
<dt id="compLib.Api.DoubleElim.get_goal">
<em class="property">static </em><code class="sig-name descname">get_goal</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><a class="headerlink" href="#compLib.Api.DoubleElim.get_goal" title="Permalink to this definition"></a></dt>
<dd><p>Get position of the goal
:return: A Position object with x and y coordinates of the goal, rotation is always -1</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Api.DoubleElim.get_items">
<em class="property">static </em><code class="sig-name descname">get_items</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; list<a class="headerlink" href="#compLib.Api.DoubleElim.get_items" title="Permalink to this definition"></a></dt>
<dd><p>Get a list with all current items
:return: A list will all items currently on the game field. Items are dictionaries that look like: {“id”: 0}</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Api.DoubleElim.get_opponent">
<em class="property">static </em><code class="sig-name descname">get_opponent</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><a class="headerlink" href="#compLib.Api.DoubleElim.get_opponent" title="Permalink to this definition"></a></dt>
<dd><p>Get position of the opponents robot
:return: A Position object with opponents robot position</p>
</dd></dl>
<dl class="py method">
<dt id="compLib.Api.DoubleElim.get_position">
<em class="property">static </em><code class="sig-name descname">get_position</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &#x2192; <a class="reference internal" href="#compLib.Api.Position" title="compLib.Api.Position">compLib.Api.Position</a><a class="headerlink" href="#compLib.Api.DoubleElim.get_position" title="Permalink to this definition"></a></dt>
<dd><p>Get position of the robot
:return: A Position object with robot position</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="position">
<h2>Position<a class="headerlink" href="#position" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLib.Api.Position">
<em class="property">class </em><code class="sig-prename descclassname">compLib.Api.</code><code class="sig-name descname">Position</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="n">y</span></em>, <em class="sig-param"><span class="n">degrees</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Api.Position" title="Permalink to this definition"></a></dt>
<dd><p>Datastructure for holding a position</p>
</dd></dl>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="calling-seeding-api">
<h3>Calling Seeding API<a class="headerlink" href="#calling-seeding-api" title="Permalink to this headline"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">Seeding</span>
<span class="n">park</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">get_park</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;I should move to parking position: {park}&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;I can&#39;t move to this position yet :(&quot;</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Moving to position 1!&quot;</span><span class="p">)</span>
<span class="c1"># drive to parking position using Motors module...</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Now hopefully at position 1&quot;</span><span class="p">)</span>
<span class="c1"># drive back using Motors module...</span>
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="c1"># do something similar to park == 1..</span>
<span class="k">elif</span> <span class="n">park</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
<span class="c1"># do something similar to park == 1..</span>
<span class="n">success</span> <span class="o">=</span> <span class="n">Seeding</span><span class="o">.</span><span class="n">pay_park</span><span class="p">()</span>
<span class="k">if</span> <span class="n">success</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;We scored some points!&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;We failed :(&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="calling-double-elimination-api">
<h3>Calling Double Elimination API<a class="headerlink" href="#calling-double-elimination-api" title="Permalink to this headline"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Api</span> <span class="kn">import</span> <span class="n">DoubleElim</span>
<span class="n">position</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_position</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}&quot;</span><span class="p">)</span>
<span class="n">goal</span> <span class="o">=</span> <span class="n">DoubleElim</span><span class="o">.</span><span class="n">get_goal</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Goal is at: x={goal.x}, y={goal.y}&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Battery.html" class="btn btn-neutral float-right" title="Battery" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></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" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/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

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Battery &mdash; CompLib 0.0.1 documentation</title>
<title>Battery &mdash; CompLib 0.0.2 documentation</title>
@ -39,7 +39,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="Api" href="Api.html" />
</head>
<body class="wy-body-for-nav">
@ -85,7 +85,9 @@
<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="Api.html">Api</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>
@ -210,7 +212,7 @@
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Buzzer.html" class="btn btn-neutral float-right" title="Buzzer" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></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" aria-hidden="true"></span> Previous</a>
<a href="Api.html" class="btn btn-neutral float-left" title="Api" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>

View file

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Buzzer &mdash; CompLib 0.0.1 documentation</title>
<title>Buzzer &mdash; CompLib 0.0.2 documentation</title>
@ -85,7 +85,9 @@
<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="Api.html">Api</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

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Infrared Sensor &mdash; CompLib 0.0.1 documentation</title>
<title>Infrared Sensor &mdash; CompLib 0.0.2 documentation</title>
@ -85,7 +85,9 @@
<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="Api.html">Api</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

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Motor &mdash; CompLib 0.0.1 documentation</title>
<title>Motor &mdash; CompLib 0.0.2 documentation</title>
@ -85,7 +85,9 @@
<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="Api.html">Api</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

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Servo &mdash; CompLib 0.0.1 documentation</title>
<title>Servo &mdash; CompLib 0.0.2 documentation</title>
@ -84,7 +84,9 @@
<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="Api.html">Api</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.

238
html/other/usage.html Normal file
View file

@ -0,0 +1,238 @@
<!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.2 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="Api" href="../lib/Api.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"> 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/Api.html">Api</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="k">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/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></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" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, robo4you.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/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

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; CompLib 0.0.1 documentation</title>
<title>Search &mdash; CompLib 0.0.2 documentation</title>
@ -86,7 +86,9 @@
<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/Api.html">Api</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/Api","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/Api.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst","other/usage.rst"],objects:{"compLib.Api":{DoubleElim:[1,0,1,""],Position:[1,0,1,""],Seeding:[1,0,1,""]},"compLib.Api.DoubleElim":{get_goal:[1,1,1,""],get_items:[1,1,1,""],get_opponent:[1,1,1,""],get_position:[1,1,1,""]},"compLib.Api.Seeding":{get_park:[1,1,1,""],pay_park:[1,1,1,""],simon_says:[1,1,1,""]},"compLib.Battery":{Battery:[2,0,1,""]},"compLib.Battery.Battery":{percent:[2,1,1,""]},"compLib.Buzzer":{Buzzer:[3,0,1,""]},"compLib.Buzzer.Buzzer":{set:[3,1,1,""]},"compLib.IRSensor":{IRSensor:[4,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[4,1,1,""],bottom_middle:[4,1,1,""],bottom_right:[4,1,1,""],top_left_percent:[4,1,1,""],top_right_percent:[4,1,1,""]},"compLib.Motor":{Motor:[5,0,1,""]},"compLib.Motor.Motor":{all_off:[5,1,1,""],power:[5,1,1,""]},"compLib.Servo":{Servo:[6,0,1,""]},"compLib.Servo.Servo":{set_position:[6,1,1,""],setup_position:[6,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[2,4,5],"2021":0,"class":[0,1,4,6],"import":[1,2,3,5,7],"int":[1,2,4,5,6],"return":[1,2,4],"static":[1,2,3,4,5,6],"true":[1,3,4],Used:[2,3],__main__:7,__name__:7,access:4,after:1,all:[1,5],all_off:5,alwai:1,angl:6,api:0,back:1,backward:7,batteri:0,beep:7,between:[1,2,4,5,6],bin:7,bool:[1,3,4],bottom:4,bottom_left:4,bottom_middl:4,bottom_right:4,buup:7,buzzer:0,call:0,can:1,channel:6,commun:1,complib:[0,1,2,3,4,5,6,7],connect:[5,6],control:[5,6],coordin:1,current:1,datastructur:1,def:7,degre:1,detect:4,dictionari:1,differ:4,document:0,doubl:0,doubleelim:1,drive:[0,1],dure:6,ein:7,elif:1,elimin:0,els:1,exampl:0,fail:1,fals:[1,3],field:1,forward:7,from:[1,2,3,5,7],game:1,get:[1,2,4],get_goal:1,get_item:1,get_oppon:1,get_park:1,get_posit:1,goal:1,hallo:7,hold:1,hopefulli:1,ich:7,infrar:0,interact:[2,3],irsensor:4,item:1,left:[4,5],like:1,list:1,look:1,main:7,make:1,max:5,mayb:0,middl:4,modul:1,motor:[0,1,7],move:1,next:1,now:1,object:1,off:0,oppon:1,pai:1,paramet:[3,5,6],park:1,parkingsapc:1,pay_park:1,percent:[2,5],percentag:[0,4,5],point:1,port:[5,6,7],posit:[0,6],power:[5,7],print:[0,1,7],process:6,rang:[5,7],request:1,right:[4,5],robot:[1,4,6,7],rotat:1,sai:1,score:1,seed:0,sensor:0,servo:0,set:[3,5,6],set_posit:6,setup:6,setup_posit:6,should:1,signal:4,similar:1,simon:1,simon_sai:1,sleep:[3,7],some:1,someth:1,specifi:5,speed:5,statu:4,straight:0,success:1,thi:1,time:[1,3,7],top:[4,5],top_left_perc:4,top_right_perc:4,turn:[0,5],type:[2,4],usag:0,used:[0,1,5,6],using:1,which:5,yet:1,zone:1},titles:["Robo4you Competition Library","Api","Battery","Buzzer","Infrared Sensor","Motor","Servo","Usage"],titleterms:{"class":[2,3,5],api:1,batteri:2,buzzer:3,call:1,competit:0,content:0,document:[2,3,5],doubl:1,drive:5,elimin:1,exampl:[1,2,3,5],infrar:4,librari:0,mayb:5,motor:5,off:3,percentag:2,posit:1,print:2,robo4y:0,seed:1,sensor:4,servo:6,straight:5,turn:3,usag:7}})