Update documentation

This commit is contained in:
Konstantin Lampalzer 2022-11-13 02:54:42 +01:00
parent b469515f18
commit 0a3c69a058
24 changed files with 2879 additions and 683 deletions

View file

@ -1,16 +1,33 @@
<!DOCTYPE html>
<html class="writer-html5" lang="de" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mein drittes Programm &mdash; CompLib 0.2.3 Dokumentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.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 data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
@ -18,21 +35,39 @@
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/translations.js"></script>
<script src="../_static/js/theme.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
<link rel="search" title="Suche" href="../search.html" />
<link rel="next" title="Installationsanweisungen" href="../software/installation.html" />
<link rel="prev" title="Mein zweites Programm" href="secondProgram.html" />
</head>
<body class="wy-body-for-nav">
<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">
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
@ -40,7 +75,18 @@
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
@ -58,33 +104,73 @@
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<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="Page navigation">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a></li>
<li class="breadcrumb-item"><a href="index.html">Erste Schritte</a></li>
<li class="breadcrumb-item active">Mein drittes Programm</li>
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Erste Schritte</a> &raquo;</li>
<li>Mein drittes Programm</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/gettingStarted/thridProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="mein-drittes-programm">
<h1>Mein drittes Programm<a class="headerlink" href="#mein-drittes-programm" title="Permalink to this heading"></a></h1>
<div class="section" id="mein-drittes-programm">
<h1>Mein drittes Programm<a class="headerlink" href="#mein-drittes-programm" title="Permalink to this heading"></a></h1>
<p>Der offizielle compAIR-Bot ist mit einer Reihe von Sensoren ausgestattet. Die wichtigsten sind die Infrarotsensoren und -sender, die an der Vorderseite des Roboters angebracht sind. Insgesamt gibt es fünf IR-Sensoren.</p>
<p>Um loszulegen, muss man zunächst das entsprechende Modul wie folgt importieren:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
@ -133,37 +219,62 @@ Um den IR-Sensor zu testen, kannst du deinen Roboter auf eine schwarze Linie ste
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">6</span></code> lesen wir den Sensor Nummer <code class="docutils literal notranslate"><span class="pre">2</span></code> aus und prüfen, ob der Wert über dem von uns definierten Schwellenwert von <code class="docutils literal notranslate"><span class="pre">900</span></code> liegt. Wenn das der Fall ist, hat der IR-Sensor eine schwarze Linie erkannt.</div>
</div>
<p>Wir werden nun das Programm so ändern, dass es alle <code class="docutils literal notranslate"><span class="pre">0.1</span></code> Sekunden prüft, ob sich eine schwarze Linie unter dem Roboter befindet, und wenn dies der Fall ist, eine Meldung ausgibt.</p>
</section>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="secondProgram.html" class="btn btn-neutral float-left" title="Mein zweites Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Zurück</a>
<a href="../software/installation.html" class="btn btn-neutral float-right" title="Installationsanweisungen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../software/installation.html" class="btn btn-neutral float-right" title="Installationsanweisungen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
<a href="secondProgram.html" class="btn btn-neutral float-left" title="Mein zweites Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS).</p>
</div>
<p>
&copy; Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
Erstellt mit <a href="https://www.sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</p>
</div>
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</script>
</body>
</html>