Update documentation

This commit is contained in:
Konstantin Lampalzer 2021-01-16 01:55:10 +01:00
parent d39ad4b112
commit d555d55b2c
No known key found for this signature in database
GPG key ID: 9A60A522835A2AD9
8 changed files with 151 additions and 13 deletions

View file

@ -83,7 +83,14 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to CompLibs documentation!</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Battery</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>
<li class="toctree-l3"><a class="reference internal" href="#printing-percentage">Printing percentage</a></li>
</ul>
</li>
</ul>
</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>
@ -155,6 +162,8 @@
<div class="section" id="battery">
<span id="lib-battery"></span><h1>Battery<a class="headerlink" href="#battery" title="Permalink to this headline"></a></h1>
<div class="section" id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLIB.Battery.Battery">
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Battery.</code><code class="sig-name descname">Battery</code><a class="headerlink" href="#compLIB.Battery.Battery" title="Permalink to this definition"></a></dt>
@ -175,6 +184,18 @@
</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="printing-percentage">
<h3>Printing percentage<a class="headerlink" href="#printing-percentage" 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.Battery</span> <span class="kn">import</span> <span class="n">Battery</span>
<span class="nb">print</span><span class="p">(</span><span class="n">Battery</span><span class="o">.</span><span class="n">percent</span><span class="p">())</span>
</pre></div>
</div>
</div>
</div>
</div>

View file

@ -84,7 +84,14 @@
<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="Battery.html">Battery</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Buzzer</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>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#turning-buzzer-on-and-off">Turning buzzer on and off</a></li>
</ul>
</li>
</ul>
</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>
@ -155,6 +162,8 @@
<div class="section" id="buzzer">
<span id="lib-buzzer"></span><h1>Buzzer<a class="headerlink" href="#buzzer" title="Permalink to this headline"></a></h1>
<div class="section" id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLIB.Buzzer.Buzzer">
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Buzzer.</code><code class="sig-name descname">Buzzer</code><a class="headerlink" href="#compLIB.Buzzer.Buzzer" title="Permalink to this definition"></a></dt>
@ -172,6 +181,21 @@
</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="turning-buzzer-on-and-off">
<h3>Turning buzzer on and off<a class="headerlink" href="#turning-buzzer-on-and-off" title="Permalink to this headline"></a></h3>
<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.Buzzer</span> <span class="kn">import</span> <span class="n">Buzzer</span>
<span class="n">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">True</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">Buzzer</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>

View file

@ -86,7 +86,14 @@
<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 current"><a class="current reference internal" href="#">Motor</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Motor</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>
<li class="toctree-l3"><a class="reference internal" href="#driving-straight-maybe">Driving straight (maybe)</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Servo.html">Servo</a></li>
</ul>
@ -155,6 +162,8 @@
<div class="section" id="motor">
<span id="lib-motor"></span><h1>Motor<a class="headerlink" href="#motor" title="Permalink to this headline"></a></h1>
<div class="section" id="class-documentation">
<h2>Class Documentation<a class="headerlink" href="#class-documentation" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="compLIB.Motor.Motor">
<em class="property">class </em><code class="sig-prename descclassname">compLIB.Motor.</code><code class="sig-name descname">Motor</code><a class="headerlink" href="#compLIB.Motor.Motor" title="Permalink to this definition"></a></dt>
@ -181,6 +190,19 @@
</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="driving-straight-maybe">
<h3>Driving straight (maybe)<a class="headerlink" href="#driving-straight-maybe" 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.Motor</span> <span class="kn">import</span> <span class="n">Motor</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">4</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">50</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>