diff --git a/docs/_build/doctrees/EV3.doctree b/docs/_build/doctrees/EV3.doctree new file mode 100644 index 0000000000000000000000000000000000000000..70ab403f9ca4a4dff45c5681df03fc4e5b5376fc Binary files /dev/null and b/docs/_build/doctrees/EV3.doctree differ diff --git a/docs/_build/doctrees/Motor.doctree b/docs/_build/doctrees/Motor.doctree new file mode 100644 index 0000000000000000000000000000000000000000..54fee8fbf081626b575f96b01a76d4e83685e826 Binary files /dev/null and b/docs/_build/doctrees/Motor.doctree differ diff --git a/docs/_build/doctrees/Sensor.doctree b/docs/_build/doctrees/Sensor.doctree new file mode 100644 index 0000000000000000000000000000000000000000..0822823b56737b5b831152b98799d9090d073ce7 Binary files /dev/null and b/docs/_build/doctrees/Sensor.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 7794690289e5caa38b090c24f5e2fb653591fcbe..102dee12678bc29f461d869222a08987ef8392a4 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/examples.doctree b/docs/_build/doctrees/examples.doctree new file mode 100644 index 0000000000000000000000000000000000000000..078a28ecb867f0ec867e908b86687dc271fc73b5 Binary files /dev/null and b/docs/_build/doctrees/examples.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index c924e02b3bc5de706158cadc046dae93df3b0221..57de8bd985d20399e613c663abab145a8b92cb9e 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/readme.doctree b/docs/_build/doctrees/readme.doctree new file mode 100644 index 0000000000000000000000000000000000000000..10fd5a846a2c6469d73d1e9444d353551adab5fa Binary files /dev/null and b/docs/_build/doctrees/readme.doctree differ diff --git a/docs/_build/doctrees/source.doctree b/docs/_build/doctrees/source.doctree index 907be8bf9fe3294647328ac7ff4db17df046323a..661b7d0994baa1c79982f55d0003ddc9e708ed0d 100644 Binary files a/docs/_build/doctrees/source.doctree and b/docs/_build/doctrees/source.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 2f914f46cb0793f7cc02b51eb2ff4d61c3be649c..ba95512a49cf9e20b3eb5a7cae4f2b1ab92c2926 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -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: 5962c7d7ff4477f5fe69f4114d507ce9 +config: 647b9b9f8e20873130f8a12e22a915d1 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/EV3.html b/docs/_build/html/EV3.html new file mode 100644 index 0000000000000000000000000000000000000000..55d708d6bf236b129dc0e8f55fa9f06fef82295e --- /dev/null +++ b/docs/_build/html/EV3.html @@ -0,0 +1,412 @@ +<!DOCTYPE html> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>EV3 — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + + <link rel="stylesheet" href="_static/basic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: 'v0.4-rc.10', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> + <script type="text/javascript" src="_static/js/jquery-fix.js"></script> + <script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script> + <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> + <link rel="next" title="Motor" href="Motor.html" /> + <link rel="prev" title="Examples" href="examples.html" /> +<meta charset='utf-8'> +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> +<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> +<meta name="apple-mobile-web-app-capable" content="yes"> + + </head> + <body role="document"> + + <div id="navbar" class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html"> + Mindstorms EV3 Toolbox</a> + <span class="navbar-text navbar-version pull-left"><b>v0.4</b></span> + </div> + + <div class="collapse navbar-collapse nav-collapse"> + <ul class="nav navbar-nav"> + + + <li class="dropdown globaltoc-container"> + <a role="button" + id="dLabelGlobalToc" + data-toggle="dropdown" + data-target="#" + href="index.html">Site <b class="caret"></b></a> + <ul class="dropdown-menu globaltoc" + role="menu" + aria-labelledby="dLabelGlobalToc"><ul> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul class="current"> +<li class="toctree-l1 current"><a class="current reference internal" href="#">EV3</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="Sensor.html">Sensor</a></li> +</ul> +</ul> +</li> + + <li class="dropdown"> + <a role="button" + id="dLabelLocalToc" + data-toggle="dropdown" + data-target="#" + href="#">Page <b class="caret"></b></a> + <ul class="dropdown-menu localtoc" + role="menu" + aria-labelledby="dLabelLocalToc"><ul> +<li><a class="reference internal" href="#">EV3</a></li> +</ul> +</ul> +</li> + + + + + + <li> + <a href="examples.html" title="Previous Chapter: Examples"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Examples</span> + </a> + </li> + <li> + <a href="Motor.html" title="Next Chapter: Motor"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Motor »</span> + </a> + </li> + + + + + + <li class="hidden-sm"> +<div id="sourcelink"> + <a href="_sources/EV3.txt" + rel="nofollow">Source</a> +</div></li> + + </ul> + + + +<form class="navbar-form navbar-right" action="search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search" /> + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> +</form> + + </div> + </div> + </div> + +<div class="container"> + <div class="row"> + <div class="col-md-12 content"> + + <span class="target" id="module-source"></span><div class="section" id="ev3"> +<h1>EV3<a class="headerlink" href="#ev3" title="Permalink to this headline">¶</a></h1> +<dl class="class"> +<dt id="source.EV3"> +<em class="property">class </em><code class="descclassname">source.</code><code class="descname">EV3</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3" title="Permalink to this definition">¶</a></dt> +<dd><p>High-level class to work with physical bricks.</p> +<p>This is the 'central' class (from user's view) when working with this toolbox. It +delivers a convenient interface for creating a connection to the brick and sending +commands to it. An EV3-object creates 4 Motor- and 4 Sensor-objects, one for each port.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>Creating multiple EV3 objects and connecting them to different physical bricks has not +been thoroughly tested yet, but seems to work on a first glance.</li> +</ul> +<dl class="attribute"> +<dt id="source.EV3.motorA"> +<code class="descname">motorA</code><a class="headerlink" href="#source.EV3.motorA" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Motor</em> – Motor-object interfacing port A</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.motorB"> +<code class="descname">motorB</code><a class="headerlink" href="#source.EV3.motorB" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Motor</em> – Motor-object interfacing port B</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.motorC"> +<code class="descname">motorC</code><a class="headerlink" href="#source.EV3.motorC" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Motor</em> – Motor-object interfacing port C</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.motorD"> +<code class="descname">motorD</code><a class="headerlink" href="#source.EV3.motorD" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Motor</em> – Motor-object interfacing port D</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.sensor1"> +<code class="descname">sensor1</code><a class="headerlink" href="#source.EV3.sensor1" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Sensor</em> – Motor-object interfacing port 1</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.sensor2"> +<code class="descname">sensor2</code><a class="headerlink" href="#source.EV3.sensor2" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Sensor</em> – Motor-object interfacing port 2</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.sensor3"> +<code class="descname">sensor3</code><a class="headerlink" href="#source.EV3.sensor3" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Sensor</em> – Motor-object interfacing port 3</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.sensor4"> +<code class="descname">sensor4</code><a class="headerlink" href="#source.EV3.sensor4" title="Permalink to this definition">¶</a></dt> +<dd><p><em>Sensor</em> – Motor-object interfacing port 4</p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.debug"> +<code class="descname">debug</code><a class="headerlink" href="#source.EV3.debug" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric in {0,1,2}</em> – Debug mode. <em>[WRITABLE]</em></p> +<ul class="simple"> +<li>0: Debug turned off</li> +<li>1: Debug turned on for EV3-object -> enables feedback in the console about what firmware-commands have been called when using a method</li> +<li>2: Low-level-Debug turned on -> each packet sent and received is printed to the console</li> +</ul> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.batteryMode"> +<code class="descname">batteryMode</code><a class="headerlink" href="#source.EV3.batteryMode" title="Permalink to this definition">¶</a></dt> +<dd><p><em>string in {'Percentage', 'Voltage'}</em> – Mode for reading battery charge. +<em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.batteryValue"> +<code class="descname">batteryValue</code><a class="headerlink" href="#source.EV3.batteryValue" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric</em> – Current battery charge. Depending on batteryMode, the reading +is either in percentage or voltage. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.EV3.isConnected"> +<code class="descname">isConnected</code><a class="headerlink" href="#source.EV3.isConnected" title="Permalink to this definition">¶</a></dt> +<dd><p><em>bool</em> – True if virtual brick-object is connected to physical one. <em>[READ-ONLY]</em></p> +</dd></dl> + +<p class="rubric">Examples</p> +<p>b = EV3(); <br /> +b.connect('usb'); <br /> +ma = b.motorA; <br /> +ma.setProperties('power', 50, 'limitValue', 720); <br /> +ma.start(); <br /> +% fun <br /> +b.sensor1.value <br /> +b.waitFor(); <br /> +b.beep(); <br /> +delete b; <br /></p> +<dl class="method"> +<dt id="source.EV3.beep"> +<code class="descname">beep</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.beep" title="Permalink to this definition">¶</a></dt> +<dd><p>Plays a 'beep'-tone on brick.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>This equals playTone(10, 1000, 100) (Wraps the same opCode in comm-layer)</li> +</ul> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.beep(); <br /></p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.connect"> +<code class="descname">connect</code><span class="sig-paren">(</span><em>ev3</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.connect" title="Permalink to this definition">¶</a></dt> +<dd><p>Connects EV3-object and its Motors and Sensors to physical brick.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>connectionType</strong> (<em>string in {'bt', 'usb'}</em>) – Connection type</li> +<li><strong>serPort</strong> (<em>string in {'/dev/rfcomm1', '/dev/rfcomm2', ...}</em>) – Path to serial port +(if 'bt')</li> +<li><strong>beep</strong> (<em>bool</em>) – If true, EV3 beeps if connection has been established</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Examples</p> +<p>% Setup bluetooth connection via com-port 0 <br /> +b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +% Setup usb connection, beep when connection has been established +b = EV3(); <br /> +b.connect('usb', 'beep', 'on', ); <br /></p> +<p>Check connection</p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.disconnect"> +<code class="descname">disconnect</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.disconnect" title="Permalink to this definition">¶</a></dt> +<dd><p>Disconnects EV3-object and its Motors and Sensors from physical brick.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>Gets called automatically when EV3-object is destroyed.</li> +</ul> +<p class="rubric">Example</p> +<p>b = EV3(); +b.connect('bt', 'serPort', '/dev/rfcomm0'); +% do stuff +b.disconnect();</p> +<p>Reset motors and sensors before disconnecting</p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.playTone"> +<code class="descname">playTone</code><span class="sig-paren">(</span><em>ev3</em>, <em>volume</em>, <em>frequency</em>, <em>duration</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.playTone" title="Permalink to this definition">¶</a></dt> +<dd><p>Plays tone on brick.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>volume</strong> (<em>numeric in [0, 100]</em>) – in percent</li> +<li><strong>frequency</strong> (<em>numeric in [250, 10000]</em>) – in Hertz</li> +<li><strong>duration</strong> (<em>numeric >0</em>) – in milliseconds</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.playTone(40, 5000, 1000); % Plays tone with 40% volume and 5000Hz for 1 +second. <br /></p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.setProperties"> +<code class="descname">setProperties</code><span class="sig-paren">(</span><em>ev3</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.setProperties" title="Permalink to this definition">¶</a></dt> +<dd><p>Set multiple EV3 properties at once using MATLAB's inputParser.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>debug</strong> (<em>numeric in {0,1,2}</em>) – see EV3.debug <em>[OPTIONAL]</em></li> +<li><strong>batteryMode</strong> (<em>string in {'Voltage'/'Percentage'}</em>) – see EV3.batteryMode <em>[OPTIONAL]</em></li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.setProperties('debug', 'on', 'batteryMode', 'Voltage'); <br /> +% Instead of: b.debug = 'on'; b.batteryMode = 'Voltage'; <br /></p> +<p>See also EV3.DEBUG, EV3.BATTERYMODE</p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.stopAllMotors"> +<code class="descname">stopAllMotors</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.stopAllMotors" title="Permalink to this definition">¶</a></dt> +<dd><p>Sends a stop-command to all motor-ports</p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.stopTone"> +<code class="descname">stopTone</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.stopTone" title="Permalink to this definition">¶</a></dt> +<dd><p>Stops tone currently played</p> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.playTone(10,100,100000000); % Accidentally given wrong tone duration :) <br /> +b.stopTone(); % Stops tone immediately. <br /></p> +</dd></dl> + +<dl class="method"> +<dt id="source.EV3.tonePlayed"> +<code class="descname">tonePlayed</code><span class="sig-paren">(</span><em>ev3</em><span class="sig-paren">)</span><a class="headerlink" href="#source.EV3.tonePlayed" title="Permalink to this definition">¶</a></dt> +<dd><p>Tests if tone is currently played.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><strong>status</strong> – True if a tone is being played</td> +</tr> +<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td> +</tr> +</tbody> +</table> +<dl class="docutils"> +<dt>Example</dt> +<dd>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.playTone(10, 100, 1000); <br /> +pause(0.5); <br /> +b.tonePlayed() -> Outputs 1 to console. <br /></dd> +</dl> +</dd></dl> + +</dd></dl> + +</div> + + + </div> + + </div> +</div> +<footer class="footer"> + <div class="container"> + <p class="pull-right"> + <a href="#">Back to top</a> + + </p> + <p> + © Copyright 2016, LfB - RWTH Aachen.<br/> + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> + </p> + </div> +</footer> + </body> +</html> \ No newline at end of file diff --git a/docs/_build/html/Motor.html b/docs/_build/html/Motor.html new file mode 100644 index 0000000000000000000000000000000000000000..2745b4e244d29a117707ff5c611a1b27fe1b0c10 --- /dev/null +++ b/docs/_build/html/Motor.html @@ -0,0 +1,442 @@ +<!DOCTYPE html> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Motor — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + + <link rel="stylesheet" href="_static/basic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: 'v0.4-rc.10', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> + <script type="text/javascript" src="_static/js/jquery-fix.js"></script> + <script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script> + <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> + <link rel="next" title="Sensor" href="Sensor.html" /> + <link rel="prev" title="EV3" href="EV3.html" /> +<meta charset='utf-8'> +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> +<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> +<meta name="apple-mobile-web-app-capable" content="yes"> + + </head> + <body role="document"> + + <div id="navbar" class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html"> + Mindstorms EV3 Toolbox</a> + <span class="navbar-text navbar-version pull-left"><b>v0.4</b></span> + </div> + + <div class="collapse navbar-collapse nav-collapse"> + <ul class="nav navbar-nav"> + + + <li class="dropdown globaltoc-container"> + <a role="button" + id="dLabelGlobalToc" + data-toggle="dropdown" + data-target="#" + href="index.html">Site <b class="caret"></b></a> + <ul class="dropdown-menu globaltoc" + role="menu" + aria-labelledby="dLabelGlobalToc"><ul> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Motor</a></li> +<li class="toctree-l1"><a class="reference internal" href="Sensor.html">Sensor</a></li> +</ul> +</ul> +</li> + + <li class="dropdown"> + <a role="button" + id="dLabelLocalToc" + data-toggle="dropdown" + data-target="#" + href="#">Page <b class="caret"></b></a> + <ul class="dropdown-menu localtoc" + role="menu" + aria-labelledby="dLabelLocalToc"><ul> +<li><a class="reference internal" href="#">Motor</a></li> +</ul> +</ul> +</li> + + + + + + <li> + <a href="EV3.html" title="Previous Chapter: EV3"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« EV3</span> + </a> + </li> + <li> + <a href="Sensor.html" title="Next Chapter: Sensor"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Sensor »</span> + </a> + </li> + + + + + + <li class="hidden-sm"> +<div id="sourcelink"> + <a href="_sources/Motor.txt" + rel="nofollow">Source</a> +</div></li> + + </ul> + + + +<form class="navbar-form navbar-right" action="search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search" /> + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> +</form> + + </div> + </div> + </div> + +<div class="container"> + <div class="row"> + <div class="col-md-12 content"> + + <span class="target" id="module-source"></span><div class="section" id="motor"> +<h1>Motor<a class="headerlink" href="#motor" title="Permalink to this headline">¶</a></h1> +<dl class="class"> +<dt id="source.Motor"> +<em class="property">class </em><code class="descclassname">source.</code><code class="descname">Motor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor" title="Permalink to this definition">¶</a></dt> +<dd><p>High-level class to work with motors.</p> +<p>This class is supposed to ease the use of the brick's motors. It is possible to set all +kinds of parameters, request the current status of the motor ports and of course send +commands to the brick to be executed on the respective port.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>You don't need to create instances of this class. The EV3-class automatically creates +instances for each motor port, and you can work with them via the EV3-object.</li> +<li>The Motor-class represents motor ports, not individual motors!</li> +<li>If you start a motor with power=0, the internal state will still be set to +'isRunning'</li> +</ul> +<dl class="attribute"> +<dt id="source.Motor.power"> +<code class="descname">power</code><a class="headerlink" href="#source.Motor.power" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric in [-100, 100]</em> – Power level of motor in percent. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.speedRegulation"> +<code class="descname">speedRegulation</code><a class="headerlink" href="#source.Motor.speedRegulation" title="Permalink to this definition">¶</a></dt> +<dd><p><em>bool</em> – Speed regulation turned on or off. When turned on, motor will +try to 'hold' its speed at given power level, whatever the load. In this mode, the +highest possible speed depends on the load and mostly goes up to around 70-80 (at +this point, the Brick internally input 100% power). When turned off, motor will +constantly input the same power into the motor. The resulting speed will be +somewhat lower, depending on the load. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.smoothStart"> +<code class="descname">smoothStart</code><a class="headerlink" href="#source.Motor.smoothStart" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric s. t. smoothStart+smoothStop < limitValue</em> – Degrees/Time +indicating how far/long the motor should smoothly start. Depending on limitMode, +the input is interpreted either in degrees or milliseconds. The first +{smoothStart}-milliseconds/degrees of limitValue the motor will slowly accelerate +until reaching its defined speed. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.smoothStop"> +<code class="descname">smoothStop</code><a class="headerlink" href="#source.Motor.smoothStop" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric s. t. smoothStart+smoothStop < limitValue</em> – Degrees/Time +indicating how far/long the motor should smoothly stop. Depending on limitMode, the +input is interpreted either in degrees or milliseconds. The last +[smoothStop]-milliseconds/degrees of limitValue the motor will slowly slow down +until it has stopped. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.limitValue"> +<code class="descname">limitValue</code><a class="headerlink" href="#source.Motor.limitValue" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric>=0</em> – Degrees/Time indicating how far/long the motor should run. +Depending on limitMode, the input is interpreted either in degrees or +milliseconds. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.limitMode"> +<code class="descname">limitMode</code><a class="headerlink" href="#source.Motor.limitMode" title="Permalink to this definition">¶</a></dt> +<dd><p><em>'Tacho'|'Time'</em> – Mode for motor limit. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.brakeMode"> +<code class="descname">brakeMode</code><a class="headerlink" href="#source.Motor.brakeMode" title="Permalink to this definition">¶</a></dt> +<dd><p><em>'Brake'|'Coast'</em> – Action done when stopping. If 'Coast', the motor will (at +tacholimit, if ~=0) coast to a stop. If 'Brake', the motor will stop immediately +(at tacholimit, if ~=0) and hold the brake. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.debug"> +<code class="descname">debug</code><a class="headerlink" href="#source.Motor.debug" title="Permalink to this definition">¶</a></dt> +<dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to +the sublayer ('communication layer'), there is feedback in the console about what +command has been called. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.isRunning"> +<code class="descname">isRunning</code><a class="headerlink" href="#source.Motor.isRunning" title="Permalink to this definition">¶</a></dt> +<dd><p><em>bool</em> – True if motor is running. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.tachoCount"> +<code class="descname">tachoCount</code><a class="headerlink" href="#source.Motor.tachoCount" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric</em> – Current tacho count. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.currentSpeed"> +<code class="descname">currentSpeed</code><a class="headerlink" href="#source.Motor.currentSpeed" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric</em> – Current speed of motor. If speedRegulation=on this should equal power, +otherwise it will probably be lower than that. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Motor.type"> +<code class="descname">type</code><a class="headerlink" href="#source.Motor.type" title="Permalink to this definition">¶</a></dt> +<dd><p><em>DeviceType</em> – Type of connected device if any. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.internalReset"> +<code class="descname">internalReset</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.internalReset" title="Permalink to this definition">¶</a></dt> +<dd><p>Resets internal tacho count. Use this if motor behaves weird (i.e. not starting at all, or not correctly +running to limitValue)</p> +<p>The internal tacho count is used for positioning the motor. When the +motor is running with a tacho limit, internally it uses another counter than the +one read by tachoCount. This internal tacho count needs to be reset if you +physically change the motor's position or it coasted into a stop. If the motor's +brakemode is 'Coast', this function is called automatically.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>A better name would probably be resetPosition...</li> +<li>Gets called automatically when starting the motor and the internal tacho</li> +</ul> +<p>count is > 0</p> +<p>See also MOTOR.RESETTACHOCOUNT</p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.resetTachoCount"> +<code class="descname">resetTachoCount</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.resetTachoCount" title="Permalink to this definition">¶</a></dt> +<dd><p>Resets tachocount</p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.setBrake"> +<code class="descname">setBrake</code><span class="sig-paren">(</span><em>motor</em>, <em>brake</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.setBrake" title="Permalink to this definition">¶</a></dt> +<dd><p>Apply or release brake of motor</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>brake</strong> (<em>bool</em>) – If true, brake will be pulled</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.setProperties"> +<code class="descname">setProperties</code><span class="sig-paren">(</span><em>motor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.setProperties" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets multiple Motor properties at once using MATLAB's inputParser.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>debug</strong> (<em>bool</em>) – </li> +<li><strong>smoothStart</strong> (<em>numeric in [0, limitValue]</em>) – </li> +<li><strong>smoothStop</strong> (<em>numeric in [0, limitValue]</em>) – </li> +<li><strong>speedRegulation</strong> (<em>bool</em>) – </li> +<li><strong>brakeMode</strong> (<em>'Coast'|'Brake'</em>) – </li> +<li><strong>limitMode</strong> (<em>'Time'|'Tacho'</em>) – </li> +<li><strong>limitValue</strong> (<em>numeric > 0</em>) – </li> +<li><strong>power</strong> (<em>numeric in [-100,100]</em>) – </li> +<li><strong>batteryMode</strong> (<em>'Voltage'|'Percentage'</em>) – </li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.motorA.setProperties('debug', 'on', 'power', 50, 'limitValue', 720, 'speedRegulation', 'on'); <br /> +% Instead of: b.motorA.debug = 'on'; <br /> +% b.motorA.power = 50; <br /> +% b.motorA.limitValue = 720; <br /> +% b.motorA.speedRegulation = 'on'; <br /></p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.start"> +<code class="descname">start</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.start" title="Permalink to this definition">¶</a></dt> +<dd><p>Starts the motor</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>Right now, alternatingly calling this function with and without tacho limit +may lead to unexpected behaviour. For example, if you run the motor without +a tacholimit for some time using Coast, then stop using Coast, and then try +to run the with a tacholimit, it will stop sooner or later than expected, +or may not even start at all.</li> +</ul> +<p>Check connection and if motor is already running</p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.stop"> +<code class="descname">stop</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.stop" title="Permalink to this definition">¶</a></dt> +<dd><p>Stops the motor</p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.syncedStart"> +<code class="descname">syncedStart</code><span class="sig-paren">(</span><em>motor</em>, <em>syncMotor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.syncedStart" title="Permalink to this definition">¶</a></dt> +<dd><p>Starts this motor synchronized with another</p> +<p>The motor, with which this method is called, acts as a <em>master</em>, meaning that the +synchronized control is done with it und uses its parameters. When syncedStart is +called, the master sets some of the slave's (syncMotor) properties to keep it +consistent with the physical brick. So, for example, if the master has another +power-value than the slave, the slave's power-value will be set to that of the +master when syncedStart() is called. +The following parameters will be affected on the slave: <em>power</em>, <em>brakeMode</em>, +<em>limitValue</em>, <em>speedRegulation</em></p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>syncMotor</strong> (<em>Motor</em>) – The motor-object to sync with</li> +<li><strong>turnRatio</strong> (<em>numeric in [-200,200]</em>) – Ratio between the two master's and the +slave's motor speed. With values!=0 one motor will be slower than the other +or even turn into the other direction. This can be used for turning car-like +robots, for example. (Read in Firmware-comments in c_output.c): <br /> +-> 0 is moving straight forward <br /> +-> Negative values turn to the left <br /> +-> Positive values turn to the right <br /> +-> Value -100 stops the left motor <br /> +-> Value +100 stops the right motor <br /> +-> Values less than -100 makes the left motor run the opposite direction of the right motor (Spin) <br /> +-> Values greater than +100 makes the right motor run the opposite direction of the left motor (Spin) <br /></li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>This is right now a pretty 'heavy' function, as it tests if both motors are +connected AND aren't running, wasting four packets, keep that in mind</li> +</ul> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('usb'); <br /> +m = b.motorA; <br /> +slave = b.motorB; <br /> +m.power = 50; <br /> +m.syncedStart(slave); <br /> +% Do stuff <br /> +m.stop(); <br /></p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.syncedStop"> +<code class="descname">syncedStop</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.syncedStop" title="Permalink to this definition">¶</a></dt> +<dd><p>Stops both motors previously started with syncedStart.</p> +<p>See also MOTOR.SYNCEDSTART</p> +</dd></dl> + +<dl class="method"> +<dt id="source.Motor.waitFor"> +<code class="descname">waitFor</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.waitFor" title="Permalink to this definition">¶</a></dt> +<dd><p>Stops execution of program as long as motor is running</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>(OLD)This one's a bit tricky. The opCode OutputReady makes the brick stop sending +responses until the motor has stopped. For security reasons, in this toolbox +there is an internal timeout for receiving messages from the brick. It raises +an error if a reply takes too long, which would happen in this case. As a +workaround, there is an infinite loop that catches errors from outputReady and +continues then, until outputReady will actually finish without an error.</li> +<li>(OLD)OutputReady (like OutputTest in isRunning) sometimes doesn't work. If +outputReady returns in less than a second, another while-loop iterates until +the motor has stopped, this time using motor.isRunning() (this only works as +long as not both OutputTest and OutputReady are buggy).</li> +<li>(OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it +is false (No need to check if motor is connected as speed correctly +returns 0 if it's not)</li> +</ul> +</dd></dl> + +</dd></dl> + +</div> + + + </div> + + </div> +</div> +<footer class="footer"> + <div class="container"> + <p class="pull-right"> + <a href="#">Back to top</a> + + </p> + <p> + © Copyright 2016, LfB - RWTH Aachen.<br/> + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> + </p> + </div> +</footer> + </body> +</html> \ No newline at end of file diff --git a/docs/_build/html/Sensor.html b/docs/_build/html/Sensor.html new file mode 100644 index 0000000000000000000000000000000000000000..fb0118f61b82e334c8a090d468a74c00093d9af1 --- /dev/null +++ b/docs/_build/html/Sensor.html @@ -0,0 +1,398 @@ +<!DOCTYPE html> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Sensor — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + + <link rel="stylesheet" href="_static/basic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: 'v0.4-rc.10', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> + <script type="text/javascript" src="_static/js/jquery-fix.js"></script> + <script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script> + <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> + <link rel="prev" title="Motor" href="Motor.html" /> +<meta charset='utf-8'> +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> +<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> +<meta name="apple-mobile-web-app-capable" content="yes"> + + </head> + <body role="document"> + + <div id="navbar" class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html"> + Mindstorms EV3 Toolbox</a> + <span class="navbar-text navbar-version pull-left"><b>v0.4</b></span> + </div> + + <div class="collapse navbar-collapse nav-collapse"> + <ul class="nav navbar-nav"> + + + <li class="dropdown globaltoc-container"> + <a role="button" + id="dLabelGlobalToc" + data-toggle="dropdown" + data-target="#" + href="index.html">Site <b class="caret"></b></a> + <ul class="dropdown-menu globaltoc" + role="menu" + aria-labelledby="dLabelGlobalToc"><ul> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</a></li> +<li class="toctree-l1"><a class="reference internal" href="Motor.html">Motor</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Sensor</a></li> +</ul> +</ul> +</li> + + <li class="dropdown"> + <a role="button" + id="dLabelLocalToc" + data-toggle="dropdown" + data-target="#" + href="#">Page <b class="caret"></b></a> + <ul class="dropdown-menu localtoc" + role="menu" + aria-labelledby="dLabelLocalToc"><ul> +<li><a class="reference internal" href="#">Sensor</a></li> +</ul> +</ul> +</li> + + + + + + <li> + <a href="Motor.html" title="Previous Chapter: Motor"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Motor</span> + </a> + </li> + + + + + + <li class="hidden-sm"> +<div id="sourcelink"> + <a href="_sources/Sensor.txt" + rel="nofollow">Source</a> +</div></li> + + </ul> + + + +<form class="navbar-form navbar-right" action="search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search" /> + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> +</form> + + </div> + </div> + </div> + +<div class="container"> + <div class="row"> + <div class="col-md-12 content"> + + <span class="target" id="module-source"></span><div class="section" id="sensor"> +<h1>Sensor<a class="headerlink" href="#sensor" title="Permalink to this headline">¶</a></h1> +<dl class="class"> +<dt id="source.Sensor"> +<em class="property">class </em><code class="descclassname">source.</code><code class="descname">Sensor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor" title="Permalink to this definition">¶</a></dt> +<dd><p>High-level class to work with sensors.</p> +<p>The Sensor-class facilitates the communication with sensors. This mainly consists of +reading the sensor's type and current value in a specified mode.</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>You don't need to create instances of this class. The EV3-class automatically creates +instances for each sensor port, and you can work with them via the EV3-object.</li> +<li>The Sensor-class represents sensor ports, not individual sensors!</li> +</ul> +<dl class="attribute"> +<dt id="source.Sensor.mode"> +<code class="descname">mode</code><a class="headerlink" href="#source.Sensor.mode" title="Permalink to this definition">¶</a></dt> +<dd><p><em>DeviceMode.{Type}</em> – Sensor mode in which the value will be read. By default, +mode is set to DeviceMode.Default.Undefined. Once a physical sensor is connected +to the port <em>and</em> the physical Brick is connected to the EV3-object, the allowed +mode and the default mode for a Sensor-object are the following (depending on the +sensor type): <em>[WRITABLE]</em></p> +<blockquote> +<div><ul> +<li><dl class="first docutils"> +<dt>Touch-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.Touch.Pushed <em>[Default]</em></li> +<li>DeviceMode.Touch.Bumps</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Ultrasonic-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.UltraSonic.DistCM <em>[Default]</em></li> +<li>DeviceMode.UltraSonic.DistIn</li> +<li>DeviceMode.UltraSonic.Listen</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Color-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.Color.Reflect <em>[Default]</em></li> +<li>DeviceMode.Color.Ambient</li> +<li>DeviceMode.Color.Col</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Gyro-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.Gyro.Angular <em>[Default]</em></li> +<li>DeviceMode.Gyro.Rate</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Infrared-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.InfraRed.Prox <em>[Default]</em></li> +<li>DeviceMode.InfraRed.Seek</li> +<li>DeviceMode.InfraRed.Remote</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTColor-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTColor.Reflect <em>[Default]</em></li> +<li>DeviceMode.NXTColor.Ambient</li> +<li>DeviceMode.NXTColor.Color</li> +<li>DeviceMode.NXTColor.Green</li> +<li>DeviceMode.NXTColor.Blue</li> +<li>DeviceMode.NXTColor.Raw</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTLight-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTLight.Reflect <em>[Default]</em></li> +<li>DeviceMode.NXTLight.Ambient</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTSound-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTSound.DB <em>[Default]</em></li> +<li>DeviceMode.NXTSound.DBA</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTTemperature-Sensor</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTTemperature.C <em>[Default]</em></li> +<li>DeviceMode.NXTTemperature.F</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTTouch-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTTouch.Pushed <em>[Default]</em></li> +<li>DeviceMode.NXTTouch.Bumps</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>NXTUltraSonic-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.NXTUltraSonic.CM <em>[Default]</em></li> +<li>DeviceMode.NXTUltraSonic.IN</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>HTAccelerometer-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.HTAccelerometer.Acceleration <em>[Default]</em></li> +<li>DeviceMode.HTAccelerometer.AccelerationAllAxes</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>HTCompass-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.HTCompass.Degrees <em>[Default]</em></li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>HTColor-Sensor:</dt> +<dd><ul class="first last simple"> +<li>DeviceMode.HTColor.Col <em>[Default]</em></li> +<li>DeviceMode.HTColor.Red</li> +<li>DeviceMode.HTColor.Green</li> +<li>DeviceMode.HTColor.Blue</li> +<li>DeviceMode.HTColor.White</li> +<li>DeviceMode.HTColor.Raw</li> +<li>DeviceMode.HTColor.Nr,</li> +<li>DeviceMode.HTColor.All</li> +</ul> +</dd> +</dl> +</li> +</ul> +</div></blockquote> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Sensor.debug"> +<code class="descname">debug</code><a class="headerlink" href="#source.Sensor.debug" title="Permalink to this definition">¶</a></dt> +<dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to +the sublayer ('communication layer'), there is feedback in the console about what +command has been called. <em>[WRITABLE]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Sensor.value"> +<code class="descname">value</code><a class="headerlink" href="#source.Sensor.value" title="Permalink to this definition">¶</a></dt> +<dd><p><em>numeric</em> – Value read from hysical sensor. What the value represents depends on +sensor.mode. <em>[READ-ONLY]</em></p> +</dd></dl> + +<dl class="attribute"> +<dt id="source.Sensor.type"> +<code class="descname">type</code><a class="headerlink" href="#source.Sensor.type" title="Permalink to this definition">¶</a></dt> +<dd><p><em>DeviceType</em> – Type of physical sensor connected to the port. Possible types are: [READ-ONLY]</p> +<ul class="simple"> +<li>DeviceType.NXTTouch</li> +<li>DeviceType.NXTLight</li> +<li>DeviceType.NXTSound</li> +<li>DeviceType.NXTColor</li> +<li>DeviceType.NXTUltraSonic</li> +<li>DeviceType.NXTTemperature</li> +<li>DeviceType.LargeMotor</li> +<li>DeviceType.MediumMotor</li> +<li>DeviceType.Touch</li> +<li>DeviceType.Color</li> +<li>DeviceType.UltraSonic</li> +<li>DeviceType.Gyro</li> +<li>DeviceType.InfraRed</li> +<li>DeviceType.HTColor</li> +<li>DeviceType.HTCompass</li> +<li>DeviceType.HTAccelerometer</li> +<li>DeviceType.Unknown</li> +<li>DeviceType.None</li> +<li>DeviceType.Error</li> +</ul> +</dd></dl> + +<dl class="method"> +<dt id="source.Sensor.reset"> +<code class="descname">reset</code><span class="sig-paren">(</span><em>sensor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor.reset" title="Permalink to this definition">¶</a></dt> +<dd><p>Resets value on sensor</p> +<p class="rubric">Notes</p> +<ul class="simple"> +<li>This clears ALL the sensors right now, no other Op-Code available... :(</li> +</ul> +</dd></dl> + +<dl class="method"> +<dt id="source.Sensor.setProperties"> +<code class="descname">setProperties</code><span class="sig-paren">(</span><em>sensor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor.setProperties" title="Permalink to this definition">¶</a></dt> +<dd><p>Sets multiple Sensor properties at once using MATLAB's inputParser.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>debug</strong> (<em>bool</em>) – </li> +<li><strong>mode</strong> (<em>DeviceMode.{Type}</em>) – </li> +</ul> +</td> +</tr> +</tbody> +</table> +<p class="rubric">Example</p> +<p>b = EV3(); <br /> +b.connect('bt', 'serPort', '/dev/rfcomm0'); <br /> +b.sensor1.setProperties('debug', 'on', 'mode', DeviceMode.Color.Ambient); <br /> +% Instead of: b.sensor1.debug = 'on'; <br /> +% b.sensor1.mode = DeviceMode.Color.Ambient; <br /></p> +</dd></dl> + +</dd></dl> + +</div> + + + </div> + + </div> +</div> +<footer class="footer"> + <div class="container"> + <p class="pull-right"> + <a href="#">Back to top</a> + + </p> + <p> + © Copyright 2016, LfB - RWTH Aachen.<br/> + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> + </p> + </div> +</footer> + </body> +</html> \ No newline at end of file diff --git a/docs/_build/html/_sources/EV3.txt b/docs/_build/html/_sources/EV3.txt new file mode 100644 index 0000000000000000000000000000000000000000..bb679dc88652edb9e25f3339b2407d052e4307f5 --- /dev/null +++ b/docs/_build/html/_sources/EV3.txt @@ -0,0 +1,12 @@ +.. automodule:: source + +.. |br| raw:: html + + <br /> +EV3 +=== + +.. autoclass:: EV3 + :members: connect, disconnect, stopAllMotors, beep, playTone, stopTone, tonePlayed, setProperties + + diff --git a/docs/_build/html/_sources/Motor.txt b/docs/_build/html/_sources/Motor.txt new file mode 100644 index 0000000000000000000000000000000000000000..4e89a896e0b6aeccef31836a19ee29d3dd73eeb9 --- /dev/null +++ b/docs/_build/html/_sources/Motor.txt @@ -0,0 +1,10 @@ +.. automodule:: source + +.. |br| raw:: html + + <br /> +Motor +===== + +.. autoclass:: Motor + :members: start, stop, syncedStart, syncedStop, waitFor, internalReset, resetTachoCount, setBrake, setProperties diff --git a/docs/_build/html/_sources/Sensor.txt b/docs/_build/html/_sources/Sensor.txt new file mode 100644 index 0000000000000000000000000000000000000000..0404ade83e4643e3b8dd830a8b428f1b06dfd4fa --- /dev/null +++ b/docs/_build/html/_sources/Sensor.txt @@ -0,0 +1,10 @@ +.. automodule:: source + +.. |br| raw:: html + + <br /> +Sensor +====== + +.. autoclass:: Sensor + :members: reset, setProperties diff --git a/docs/_build/html/_sources/examples.txt b/docs/_build/html/_sources/examples.txt new file mode 100644 index 0000000000000000000000000000000000000000..b90c0e1cba794d0c4c0d5679dba4cb0fb9fc4ef6 --- /dev/null +++ b/docs/_build/html/_sources/examples.txt @@ -0,0 +1,3 @@ +======== +Examples +======== diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt index 32339b8c15a093a9abd83ae2f95e974280f64bda..4ebb311f2fe3915e3d5b5dba277214e1933c6419 100644 --- a/docs/_build/html/_sources/index.txt +++ b/docs/_build/html/_sources/index.txt @@ -3,21 +3,48 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Toolbox for controlling Lego Mindstorms EV3 with MATLAB -======================================================= +================================================== +MATLAB Toolbox for controlling Lego Mindstorms EV3 +================================================== -Contents: +This MATLAB toolbox was designed to abstract and simplify controlling Lego Mindstorms +EV3 robots. Via Bluetooth or USB you can read sensor values or control +your robots' motors in an intuitive way. On a low level (the ##hyperlink## Communication +layer) you are able to send various commands directly to the brick, while on a high level, +several classes abstract this behaviour for you. If you want to easily access your EV3 robot, +these are the classes you will mostly use. + +Take a look at the ##link to readme## for installation instructions. + +This toolbox is being developed at the RWTH Aachen, Germany, as part of the students' lab +##hyperlink## 'MATLAB meets Mindstorms'. It is the follow-up of the widely used ##hyperlink## MATLAB NXT Toolbox. + +##image## + +Contents +======== + +Setting up the toolbox .. toctree:: - :maxdepth: 4 + :maxdepth: 2 - source + readme + examples +Toolbox documentation -Indices and tables -================== +.. toctree:: + :maxdepth: 2 + + EV3 + Motor + Sensor + +Advanced + +.. toctree:: + :maxdepth: 2 -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + diff --git a/docs/_build/html/_sources/readme.txt b/docs/_build/html/_sources/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..ddcfba5efbf31886070e6c0c8f8f87190c277a21 --- /dev/null +++ b/docs/_build/html/_sources/readme.txt @@ -0,0 +1,12 @@ +======= +General +======= + +Installation +============ + +Contribution +============ + +Licenses +======== diff --git a/docs/_build/html/_sources/source.txt b/docs/_build/html/_sources/source.txt index 589e1dd71f965275426b905e185bec519a40f781..bb679dc88652edb9e25f3339b2407d052e4307f5 100644 --- a/docs/_build/html/_sources/source.txt +++ b/docs/_build/html/_sources/source.txt @@ -10,16 +10,3 @@ EV3 :members: connect, disconnect, stopAllMotors, beep, playTone, stopTone, tonePlayed, setProperties -Motor -===== - -.. autoclass:: Motor - :members: start, stop, syncedStart, syncedStop, waitFor, internalReset, resetTachoCount, setBrake, setProperties - - -Sensor -====== - -.. autoclass:: Sensor - :members: reset, setProperties - diff --git a/docs/_build/html/_static/bootstrap-sphinx.css b/docs/_build/html/_static/bootstrap-sphinx.css index 3f397e1b7a4250aa7749aa5c4a59dcee5607b589..759bc88ee9ba234ef78238daceea15bb5311cf50 100644 --- a/docs/_build/html/_static/bootstrap-sphinx.css +++ b/docs/_build/html/_static/bootstrap-sphinx.css @@ -38,12 +38,12 @@ body { - padding-top: 40px; + padding-top: 60px; } .page-top { - top: 40px; + top: 60px; } @@ -60,12 +60,12 @@ table { } .highlighttable .code pre { - font-size: 12px; + font-size: 15px; } .highlighttable .linenos pre { word-break: normal; - font-size: 12px; + font-size: 15px; } div.highlight { diff --git a/docs/_build/html/examples.html b/docs/_build/html/examples.html new file mode 100644 index 0000000000000000000000000000000000000000..aa2918ba5f0a45f894afd44d7986283df2866a28 --- /dev/null +++ b/docs/_build/html/examples.html @@ -0,0 +1,161 @@ +<!DOCTYPE html> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>Examples — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + + <link rel="stylesheet" href="_static/basic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: 'v0.4-rc.10', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> + <script type="text/javascript" src="_static/js/jquery-fix.js"></script> + <script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script> + <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> + <link rel="next" title="EV3" href="source.html" /> + <link rel="prev" title="General information" href="readme.html" /> +<meta charset='utf-8'> +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> +<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> +<meta name="apple-mobile-web-app-capable" content="yes"> + + </head> + <body role="document"> + + <div id="navbar" class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html"> + Mindstorms EV3 Toolbox</a> + <span class="navbar-text navbar-version pull-left"><b>v0.4</b></span> + </div> + + <div class="collapse navbar-collapse nav-collapse"> + <ul class="nav navbar-nav"> + + + <li class="dropdown globaltoc-container"> + <a role="button" + id="dLabelGlobalToc" + data-toggle="dropdown" + data-target="#" + href="index.html">Site <b class="caret"></b></a> + <ul class="dropdown-menu globaltoc" + role="menu" + aria-labelledby="dLabelGlobalToc"><ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General information</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +</ul> +</ul> +</li> + + <li class="dropdown"> + <a role="button" + id="dLabelLocalToc" + data-toggle="dropdown" + data-target="#" + href="#">Page <b class="caret"></b></a> + <ul class="dropdown-menu localtoc" + role="menu" + aria-labelledby="dLabelLocalToc"><ul> +<li><a class="reference internal" href="#">Examples</a></li> +</ul> +</ul> +</li> + + + + + + <li> + <a href="readme.html" title="Previous Chapter: General information"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« General infor...</span> + </a> + </li> + <li> + <a href="source.html" title="Next Chapter: EV3"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">EV3 »</span> + </a> + </li> + + + + + + <li class="hidden-sm"> +<div id="sourcelink"> + <a href="_sources/examples.txt" + rel="nofollow">Source</a> +</div></li> + + </ul> + + + +<form class="navbar-form navbar-right" action="search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search" /> + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> +</form> + + </div> + </div> + </div> + +<div class="container"> + <div class="row"> + <div class="col-md-12 content"> + + <div class="section" id="examples"> +<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1> +</div> + + + </div> + + </div> +</div> +<footer class="footer"> + <div class="container"> + <p class="pull-right"> + <a href="#">Back to top</a> + + </p> + <p> + © Copyright 2016, LfB - RWTH Aachen.<br/> + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> + </p> + </div> +</footer> + </body> +</html> \ No newline at end of file diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index d5a11928440a916168201c860a5a18277bbb810b..00368a1f7d9bd5915cc5c17d2162065a9fd56d71 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -10,8 +10,7 @@ <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> @@ -68,9 +67,13 @@ <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"><ul> -<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> </ul> </li> @@ -140,21 +143,21 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.batteryMode">batteryMode (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.batteryMode">batteryMode (source.EV3 attribute)</a>, <a href="source.html#source.EV3.batteryMode">[1]</a> </dt> - <dt><a href="source.html#source.EV3.batteryValue">batteryValue (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.batteryValue">batteryValue (source.EV3 attribute)</a>, <a href="source.html#source.EV3.batteryValue">[1]</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.beep">beep() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.beep">beep() (source.EV3 method)</a>, <a href="source.html#source.EV3.beep">[1]</a> </dt> - <dt><a href="source.html#source.Motor.brakeMode">brakeMode (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.brakeMode">brakeMode (source.Motor attribute)</a> </dt> </dl></td> @@ -164,13 +167,13 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.connect">connect() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.connect">connect() (source.EV3 method)</a>, <a href="source.html#source.EV3.connect">[1]</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.currentSpeed">currentSpeed (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.currentSpeed">currentSpeed (source.Motor attribute)</a> </dt> </dl></td> @@ -180,23 +183,23 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.debug">debug (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.debug">debug (source.EV3 attribute)</a>, <a href="source.html#source.EV3.debug">[1]</a> </dt> <dd><dl> - <dt><a href="source.html#source.Motor.debug">(source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.debug">(source.Motor attribute)</a> </dt> - <dt><a href="source.html#source.Sensor.debug">(source.Sensor attribute)</a> + <dt><a href="Sensor.html#source.Sensor.debug">(source.Sensor attribute)</a> </dt> </dl></dd> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.disconnect">disconnect() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.disconnect">disconnect() (source.EV3 method)</a>, <a href="source.html#source.EV3.disconnect">[1]</a> </dt> </dl></td> @@ -206,7 +209,7 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3">EV3 (class in source)</a> + <dt><a href="EV3.html#source.EV3">EV3 (class in source)</a>, <a href="source.html#source.EV3">[1]</a> </dt> </dl></td> @@ -216,17 +219,17 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.internalReset">internalReset() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.internalReset">internalReset() (source.Motor method)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.isConnected">isConnected (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.isConnected">isConnected (source.EV3 attribute)</a>, <a href="source.html#source.EV3.isConnected">[1]</a> </dt> - <dt><a href="source.html#source.Motor.isRunning">isRunning (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.isRunning">isRunning (source.Motor attribute)</a> </dt> </dl></td> @@ -236,13 +239,13 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.limitMode">limitMode (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.limitMode">limitMode (source.Motor attribute)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.limitValue">limitValue (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.limitValue">limitValue (source.Motor attribute)</a> </dt> </dl></td> @@ -252,29 +255,29 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Sensor.mode">mode (source.Sensor attribute)</a> + <dt><a href="Sensor.html#source.Sensor.mode">mode (source.Sensor attribute)</a> </dt> - <dt><a href="source.html#source.Motor">Motor (class in source)</a> + <dt><a href="Motor.html#source.Motor">Motor (class in source)</a> </dt> - <dt><a href="source.html#source.EV3.motorA">motorA (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.motorA">motorA (source.EV3 attribute)</a>, <a href="source.html#source.EV3.motorA">[1]</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.motorB">motorB (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.motorB">motorB (source.EV3 attribute)</a>, <a href="source.html#source.EV3.motorB">[1]</a> </dt> - <dt><a href="source.html#source.EV3.motorC">motorC (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.motorC">motorC (source.EV3 attribute)</a>, <a href="source.html#source.EV3.motorC">[1]</a> </dt> - <dt><a href="source.html#source.EV3.motorD">motorD (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.motorD">motorD (source.EV3 attribute)</a>, <a href="source.html#source.EV3.motorD">[1]</a> </dt> </dl></td> @@ -284,13 +287,13 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.EV3.playTone">playTone() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.playTone">playTone() (source.EV3 method)</a>, <a href="source.html#source.EV3.playTone">[1]</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.power">power (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.power">power (source.Motor attribute)</a> </dt> </dl></td> @@ -300,13 +303,13 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Sensor.reset">reset() (source.Sensor method)</a> + <dt><a href="Sensor.html#source.Sensor.reset">reset() (source.Sensor method)</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.resetTachoCount">resetTachoCount() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.resetTachoCount">resetTachoCount() (source.Motor method)</a> </dt> </dl></td> @@ -316,83 +319,83 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Sensor">Sensor (class in source)</a> + <dt><a href="Sensor.html#source.Sensor">Sensor (class in source)</a> </dt> - <dt><a href="source.html#source.EV3.sensor1">sensor1 (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.sensor1">sensor1 (source.EV3 attribute)</a>, <a href="source.html#source.EV3.sensor1">[1]</a> </dt> - <dt><a href="source.html#source.EV3.sensor2">sensor2 (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.sensor2">sensor2 (source.EV3 attribute)</a>, <a href="source.html#source.EV3.sensor2">[1]</a> </dt> - <dt><a href="source.html#source.EV3.sensor3">sensor3 (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.sensor3">sensor3 (source.EV3 attribute)</a>, <a href="source.html#source.EV3.sensor3">[1]</a> </dt> - <dt><a href="source.html#source.EV3.sensor4">sensor4 (source.EV3 attribute)</a> + <dt><a href="EV3.html#source.EV3.sensor4">sensor4 (source.EV3 attribute)</a>, <a href="source.html#source.EV3.sensor4">[1]</a> </dt> - <dt><a href="source.html#source.Motor.setBrake">setBrake() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.setBrake">setBrake() (source.Motor method)</a> </dt> - <dt><a href="source.html#source.EV3.setProperties">setProperties() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.setProperties">setProperties() (source.EV3 method)</a>, <a href="source.html#source.EV3.setProperties">[1]</a> </dt> <dd><dl> - <dt><a href="source.html#source.Motor.setProperties">(source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.setProperties">(source.Motor method)</a> </dt> - <dt><a href="source.html#source.Sensor.setProperties">(source.Sensor method)</a> + <dt><a href="Sensor.html#source.Sensor.setProperties">(source.Sensor method)</a> </dt> </dl></dd> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.smoothStart">smoothStart (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.smoothStart">smoothStart (source.Motor attribute)</a> </dt> - <dt><a href="source.html#source.Motor.smoothStop">smoothStop (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.smoothStop">smoothStop (source.Motor attribute)</a> </dt> - <dt><a href="source.html#module-source">source (module)</a> + <dt><a href="EV3.html#module-source">source (module)</a>, <a href="Motor.html#module-source">[1]</a>, <a href="Sensor.html#module-source">[2]</a>, <a href="source.html#module-source">[3]</a> </dt> - <dt><a href="source.html#source.Motor.speedRegulation">speedRegulation (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.speedRegulation">speedRegulation (source.Motor attribute)</a> </dt> - <dt><a href="source.html#source.Motor.start">start() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.start">start() (source.Motor method)</a> </dt> - <dt><a href="source.html#source.Motor.stop">stop() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.stop">stop() (source.Motor method)</a> </dt> - <dt><a href="source.html#source.EV3.stopAllMotors">stopAllMotors() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.stopAllMotors">stopAllMotors() (source.EV3 method)</a>, <a href="source.html#source.EV3.stopAllMotors">[1]</a> </dt> - <dt><a href="source.html#source.EV3.stopTone">stopTone() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.stopTone">stopTone() (source.EV3 method)</a>, <a href="source.html#source.EV3.stopTone">[1]</a> </dt> - <dt><a href="source.html#source.Motor.syncedStart">syncedStart() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.syncedStart">syncedStart() (source.Motor method)</a> </dt> - <dt><a href="source.html#source.Motor.syncedStop">syncedStop() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.syncedStop">syncedStop() (source.Motor method)</a> </dt> </dl></td> @@ -402,22 +405,22 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.tachoCount">tachoCount (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.tachoCount">tachoCount (source.Motor attribute)</a> </dt> - <dt><a href="source.html#source.EV3.tonePlayed">tonePlayed() (source.EV3 method)</a> + <dt><a href="EV3.html#source.EV3.tonePlayed">tonePlayed() (source.EV3 method)</a>, <a href="source.html#source.EV3.tonePlayed">[1]</a> </dt> </dl></td> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.type">type (source.Motor attribute)</a> + <dt><a href="Motor.html#source.Motor.type">type (source.Motor attribute)</a> </dt> <dd><dl> - <dt><a href="source.html#source.Sensor.type">(source.Sensor attribute)</a> + <dt><a href="Sensor.html#source.Sensor.type">(source.Sensor attribute)</a> </dt> </dl></dd> @@ -428,7 +431,7 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Sensor.value">value (source.Sensor attribute)</a> + <dt><a href="Sensor.html#source.Sensor.value">value (source.Sensor attribute)</a> </dt> </dl></td> @@ -438,7 +441,7 @@ <table style="width: 100%" class="indextable genindextable"><tr> <td style="width: 33%" valign="top"><dl> - <dt><a href="source.html#source.Motor.waitFor">waitFor() (source.Motor method)</a> + <dt><a href="Motor.html#source.Motor.waitFor">waitFor() (source.Motor method)</a> </dt> </dl></td> diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index 045ce15577b0f1b06ee2be41b928bd3bf1a3da35..699f7495a3cbaba62f0562407a8161f965e160a3 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -5,12 +5,11 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Toolbox for controlling Lego Mindstorms EV3 with MATLAB — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + <title>MATLAB Toolbox for controlling Lego Mindstorms EV3 — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> @@ -32,7 +31,7 @@ <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="#" /> - <link rel="next" title="EV3" href="source.html" /> + <link rel="next" title="General" href="readme.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> @@ -68,9 +67,13 @@ <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"><ul> -<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> </ul> </li> @@ -84,8 +87,12 @@ <ul class="dropdown-menu localtoc" role="menu" aria-labelledby="dLabelLocalToc"><ul> -<li><a class="reference internal" href="#">Toolbox for controlling Lego Mindstorms EV3 with MATLAB</a></li> -<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li> +<li><a class="reference internal" href="#">MATLAB Toolbox for controlling Lego Mindstorms EV3</a><ul> +<li><a class="reference internal" href="#contents">Contents</a><ul> +</ul> +</li> +</ul> +</li> </ul> </ul> </li> @@ -95,7 +102,7 @@ <li> - <a href="source.html" title="Next Chapter: EV3"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">EV3 »</span> + <a href="readme.html" title="Next Chapter: General"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">General »</span> </a> </li> @@ -129,24 +136,44 @@ <div class="row"> <div class="col-md-12 content"> - <div class="section" id="toolbox-for-controlling-lego-mindstorms-ev3-with-matlab"> -<h1>Toolbox for controlling Lego Mindstorms EV3 with MATLAB<a class="headerlink" href="#toolbox-for-controlling-lego-mindstorms-ev3-with-matlab" title="Permalink to this headline">¶</a></h1> -<p>Contents:</p> + <div class="section" id="matlab-toolbox-for-controlling-lego-mindstorms-ev3"> +<h1>MATLAB Toolbox for controlling Lego Mindstorms EV3<a class="headerlink" href="#matlab-toolbox-for-controlling-lego-mindstorms-ev3" title="Permalink to this headline">¶</a></h1> +<p>This MATLAB toolbox was designed to abstract and simplify controlling Lego Mindstorms +EV3 robots. Via Bluetooth or USB you can read sensor values or control +your robots’ motors in an intuitive way. On a low level (the ##hyperlink## Communication +layer) you are able to send various commands directly to the brick, while on a high level, +several classes abstract this behaviour for you. If you want to easily access your EV3 robot, +these are the classes you will mostly use.</p> +<p>Take a look at the ##link to readme## for installation instructions.</p> +<p>This toolbox is being developed at the RWTH Aachen, Germany, as part of the students’ lab +##hyperlink## ‘MATLAB meets Mindstorms’. It is the follow-up of the widely used ##hyperlink## MATLAB NXT Toolbox.</p> +<p>##image##</p> +<div class="section" id="contents"> +<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2> +<p>Setting up the toolbox</p> <div class="toctree-wrapper compound"> <ul> -<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a><ul> +<li class="toctree-l2"><a class="reference internal" href="readme.html#installation">Installation</a></li> +<li class="toctree-l2"><a class="reference internal" href="readme.html#contribution">Contribution</a></li> +<li class="toctree-l2"><a class="reference internal" href="readme.html#licenses">Licenses</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> </ul> </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><a class="reference internal" href="genindex.html"><em>Index</em></a></li> -<li><a class="reference internal" href="mat-modindex.html"><em>Module Index</em></a></li> -<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li> +<p>Toolbox documentation</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> +</div> +<p>Advanced</p> +<div class="toctree-wrapper compound"> +</div> +</div> </div> diff --git a/docs/_build/html/mat-modindex.html b/docs/_build/html/mat-modindex.html index 1860710e5b7ebde5ad31d8827420608dc24cddd9..4fe4e6dfebc179395d25af11ea684b794bdf2433 100644 --- a/docs/_build/html/mat-modindex.html +++ b/docs/_build/html/mat-modindex.html @@ -9,8 +9,7 @@ <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> @@ -74,9 +73,13 @@ <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"><ul> -<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> </ul> </li> diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index f9b32ebf05a4d518ca862cb167db59b06156c49c..a3c132e711636a4c8ed891ddfe8a5f13a89ed346 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/readme.html b/docs/_build/html/readme.html new file mode 100644 index 0000000000000000000000000000000000000000..e1c71fa07e150a9c9b44313e99557683b3093c74 --- /dev/null +++ b/docs/_build/html/readme.html @@ -0,0 +1,175 @@ +<!DOCTYPE html> + + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <title>General — Mindstorms EV3 Toolbox v0.4-rc.10 documentation</title> + + <link rel="stylesheet" href="_static/basic.css" type="text/css" /> + <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT: './', + VERSION: 'v0.4-rc.10', + COLLAPSE_INDEX: false, + FILE_SUFFIX: '.html', + HAS_SOURCE: true + }; + </script> + <script type="text/javascript" src="_static/jquery.js"></script> + <script type="text/javascript" src="_static/underscore.js"></script> + <script type="text/javascript" src="_static/doctools.js"></script> + <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> + <script type="text/javascript" src="_static/js/jquery-fix.js"></script> + <script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script> + <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> + <link rel="next" title="Examples" href="examples.html" /> + <link rel="prev" title="MATLAB Toolbox for controlling Lego Mindstorms EV3" href="index.html" /> +<meta charset='utf-8'> +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> +<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> +<meta name="apple-mobile-web-app-capable" content="yes"> + + </head> + <body role="document"> + + <div id="navbar" class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html"> + Mindstorms EV3 Toolbox</a> + <span class="navbar-text navbar-version pull-left"><b>v0.4</b></span> + </div> + + <div class="collapse navbar-collapse nav-collapse"> + <ul class="nav navbar-nav"> + + + <li class="dropdown globaltoc-container"> + <a role="button" + id="dLabelGlobalToc" + data-toggle="dropdown" + data-target="#" + href="index.html">Site <b class="caret"></b></a> + <ul class="dropdown-menu globaltoc" + role="menu" + aria-labelledby="dLabelGlobalToc"><ul class="current"> +<li class="toctree-l1 current"><a class="current reference internal" href="#">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +</ul> +</ul> +</li> + + <li class="dropdown"> + <a role="button" + id="dLabelLocalToc" + data-toggle="dropdown" + data-target="#" + href="#">Page <b class="caret"></b></a> + <ul class="dropdown-menu localtoc" + role="menu" + aria-labelledby="dLabelLocalToc"><ul> +<li><a class="reference internal" href="#">General</a><ul> +<li><a class="reference internal" href="#installation">Installation</a></li> +<li><a class="reference internal" href="#contribution">Contribution</a></li> +<li><a class="reference internal" href="#licenses">Licenses</a></li> +</ul> +</li> +</ul> +</ul> +</li> + + + + + + <li> + <a href="index.html" title="Previous Chapter: MATLAB Toolbox for controlling Lego Mindstorms EV3"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« MATLAB Toolbo...</span> + </a> + </li> + <li> + <a href="examples.html" title="Next Chapter: Examples"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Examples »</span> + </a> + </li> + + + + + + <li class="hidden-sm"> +<div id="sourcelink"> + <a href="_sources/readme.txt" + rel="nofollow">Source</a> +</div></li> + + </ul> + + + +<form class="navbar-form navbar-right" action="search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search" /> + </div> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> +</form> + + </div> + </div> + </div> + +<div class="container"> + <div class="row"> + <div class="col-md-12 content"> + + <div class="section" id="general"> +<h1>General<a class="headerlink" href="#general" title="Permalink to this headline">¶</a></h1> +<div class="section" id="installation"> +<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="contribution"> +<h2>Contribution<a class="headerlink" href="#contribution" title="Permalink to this headline">¶</a></h2> +</div> +<div class="section" id="licenses"> +<h2>Licenses<a class="headerlink" href="#licenses" title="Permalink to this headline">¶</a></h2> +</div> +</div> + + + </div> + + </div> +</div> +<footer class="footer"> + <div class="container"> + <p class="pull-right"> + <a href="#">Back to top</a> + + </p> + <p> + © Copyright 2016, LfB - RWTH Aachen.<br/> + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.<br/> + </p> + </div> +</footer> + </body> +</html> \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 57497e3195728c761403578d1ce321e2bd22abee..fa41c0079c3d867f593e594e6c95508aa63332dc 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -9,8 +9,7 @@ <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> @@ -75,9 +74,13 @@ <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"><ul> -<li class="toctree-l1"><a class="reference internal" href="source.html">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="source.html#sensor">Sensor</a></li> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> </ul> </li> diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index 25c11b86f510e7aae182dd3588a9221f9628a14c..f3bd4579bd6b1b428fda10e4037434e7c6f4aa3e 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:49,filenames:["index","source"],objects:{"":{source:[1,0,1,""]},"source.EV3":{batteryMode:[1,2,1,""],batteryValue:[1,2,1,""],beep:[1,3,1,""],connect:[1,3,1,""],debug:[1,2,1,""],disconnect:[1,3,1,""],isConnected:[1,2,1,""],motorA:[1,2,1,""],motorB:[1,2,1,""],motorC:[1,2,1,""],motorD:[1,2,1,""],playTone:[1,3,1,""],sensor1:[1,2,1,""],sensor2:[1,2,1,""],sensor3:[1,2,1,""],sensor4:[1,2,1,""],setProperties:[1,3,1,""],stopAllMotors:[1,3,1,""],stopTone:[1,3,1,""],tonePlayed:[1,3,1,""]},"source.Motor":{brakeMode:[1,2,1,""],currentSpeed:[1,2,1,""],debug:[1,2,1,""],internalReset:[1,3,1,""],isRunning:[1,2,1,""],limitMode:[1,2,1,""],limitValue:[1,2,1,""],power:[1,2,1,""],resetTachoCount:[1,3,1,""],setBrake:[1,3,1,""],setProperties:[1,3,1,""],smoothStart:[1,2,1,""],smoothStop:[1,2,1,""],speedRegulation:[1,2,1,""],start:[1,3,1,""],stop:[1,3,1,""],syncedStart:[1,3,1,""],syncedStop:[1,3,1,""],tachoCount:[1,2,1,""],type:[1,2,1,""],waitFor:[1,3,1,""]},"source.Sensor":{debug:[1,2,1,""],mode:[1,2,1,""],reset:[1,3,1,""],setProperties:[1,3,1,""],type:[1,2,1,""],value:[1,2,1,""]},source:{EV3:[1,1,1,""],Motor:[1,1,1,""],Sensor:[1,1,1,""]}},objnames:{"0":["mat","module","MATLAB module"],"1":["mat","class","MATLAB class"],"2":["mat","attribute","MATLAB attribute"],"3":["mat","method","MATLAB method"]},objtypes:{"0":"mat:module","1":"mat:class","2":"mat:attribute","3":"mat:method"},terms:{"5000hz":1,"case":1,"catch":1,"class":1,"default":1,"function":1,"long":1,"return":1,"true":1,"try":1,"while":1,about:1,acceler:1,accelerationallax:1,accident:1,act:1,action:1,actual:1,affect:1,afraid:1,after:1,again:1,all:1,allow:1,alreadi:1,also:1,alternatingli:1,ambient:1,angular:1,ani:1,anoth:1,apply:1,aren:1,around:1,ask:1,automat:1,avail:1,avoid:1,batteri:1,batterymod:1,batterymode:1,batteryvalu:1,been:1,beep:1,befor:1,behav:1,behaviour:1,better:1,bit:1,blue:1,bluetooth:1,bool:1,both:1,brake:1,brakemod:1,brick:1,bug:1,buggi:1,bump:1,c_output:1,call:1,can:1,cannot:1,central:1,chang:1,charg:1,check:1,clear:1,coast:1,code:1,col:1,color:1,com:1,comm:1,command:1,comment:1,commun:1,confus:1,connect:1,connectiontyp:1,consist:1,consol:1,constantli:1,content:0,continu:1,conveni:1,correctli:1,count:1,counter:1,cours:1,creat:1,current:1,currentspe:1,dba:1,debug:1,defin:1,degre:1,delet:1,deliber:1,deliv:1,depend:1,descript:[],desir:1,destroi:1,dev:1,devic:1,devicemod:1,devicetyp:1,differ:1,direct:1,disconnect:1,distcm:1,distin:1,doe:1,doesn:1,don:1,done:1,down:1,durat:1,each:1,eas:1,effect:1,either:1,enabl:1,equal:1,error:1,establish:1,even:1,everytim:1,exampl:1,excerpt:1,execut:1,exit:1,expect:1,facilit:1,fals:1,far:1,feedback:1,finish:1,firmwar:1,first:1,follow:1,forward:1,four:1,frequenc:1,from:1,fun:1,get:1,given:1,glanc:1,goe:1,greater:1,green:1,gyro:1,happen:1,have:1,heavi:1,hertz:1,high:1,highest:1,hold:1,how:1,howev:1,htacceleromet:1,htcolor:1,htcompass:1,hysic:1,immedi:1,index:0,indic:1,individu:1,infinit:1,infrare:1,input:1,inputpars:1,instanc:1,instead:1,interfac:1,intern:1,internalreset:1,interpret:1,isconnect:1,isrun:1,iter:1,itself:1,keep:1,kind:1,know:1,largemotor:1,last:1,later:1,layer:1,lead:1,left:1,less:1,level:1,like:1,limit:1,limitmod:1,limitvalu:1,listen:1,load:1,loop:1,low:1,lower:1,mai:1,mainli:1,make:1,manual:1,master:1,mean:1,mediummotor:1,messag:1,method:1,millisecond:1,mind:1,mode:1,modul:0,mostli:1,motor:[],motora:1,motorb:1,motorc:1,motord:1,move:1,multipl:1,name:1,necessari:1,need:1,neg:1,newpag:[],none:1,note:1,now:1,numer:1,nxtcolor:1,nxtlight:1,nxtsound:1,nxttemperatur:1,nxttouch:1,nxtultrason:1,object:1,off:1,old:1,onc:1,once:1,onli:1,only:1,opcod:1,opposit:1,optional:1,other:1,otherwis:1,output:1,outputreadi:1,outputtest:1,packet:1,page:0,paramet:1,pass:1,path:1,paus:1,percent:1,percentag:1,physic:1,plai:1,playton:1,point:1,poll:1,port:1,posit:1,possibl:1,power:1,pretti:1,previous:1,print:1,probabl:1,program:1,properti:1,prox:1,pull:1,push:1,rais:1,rate:1,ratio:1,raw:1,reach:1,read:1,realli:1,reason:1,receiv:1,red:1,reflect:1,regul:1,releas:1,remot:1,repli:1,repres:1,request:1,reset:1,resetposit:1,resettachocount:1,respect:1,respons:1,result:1,rfcomm0:1,rfcomm1:1,rfcomm2:1,right:1,run:1,same:1,search:0,second:1,secur:1,see:1,seek:1,seem:1,send:1,sensor1:1,sensor2:1,sensor3:1,sensor4:1,sensor:[],sent:1,serial:1,serport:1,set:1,setbrak:1,setpow:1,setproperti:1,setup:1,should:1,slave:1,slow:1,slowli:1,smoothli:1,smoothstart:1,smoothstop:1,some:1,sometim:1,somewhat:1,soon:1,sooner:1,sourc:1,special:1,specifi:1,speed:1,speedregul:1,spin:1,start:1,state:1,statu:1,still:1,stop:1,stopallmotor:1,stopton:1,straight:1,string:1,stuff:1,sublay:1,suppos:1,sync:1,syncedstart:1,syncedstop:1,synchron:1,syncmotor:1,tacho:1,tachocount:1,tacholimit:1,take:1,test:1,than:1,them:1,thi:1,thoroughli:1,tight:1,time:1,timeout:1,tone:1,toneplai:1,too:1,touch:1,tricki:1,turn:1,turn_ratio:[],turnratio:1,type:1,ultrason:1,undefin:1,unexpect:1,unknown:1,until:1,usb:1,use:1,user:1,valu:1,varargin:1,via:1,view:1,virtual:1,voltag:1,volum:1,waitfor:1,want:1,wast:1,weird:1,what:1,whatev:1,when:1,which:1,white:1,without:1,work:1,workaround:1,would:1,wrap:1,writable:1,wrong:1,yet:1,you:1,zero:1},titles:["Toolbox for controlling Lego Mindstorms EV3 with MATLAB","EV3"],titleterms:{control:0,ev3:[0,1],indice:0,lego:0,matlab:0,mindstorm:0,motor:1,sensor:1,tabl:0,toolbox:0}}) \ No newline at end of file +Search.setIndex({envversion:49,filenames:["EV3","Motor","Sensor","examples","index","readme","source"],objects:{"":{source:[6,0,1,""]},"source.EV3":{batteryMode:[6,2,1,""],batteryValue:[6,2,1,""],beep:[6,3,1,""],connect:[6,3,1,""],debug:[6,2,1,""],disconnect:[6,3,1,""],isConnected:[6,2,1,""],motorA:[6,2,1,""],motorB:[6,2,1,""],motorC:[6,2,1,""],motorD:[6,2,1,""],playTone:[6,3,1,""],sensor1:[6,2,1,""],sensor2:[6,2,1,""],sensor3:[6,2,1,""],sensor4:[6,2,1,""],setProperties:[6,3,1,""],stopAllMotors:[6,3,1,""],stopTone:[6,3,1,""],tonePlayed:[6,3,1,""]},"source.Motor":{brakeMode:[1,2,1,""],currentSpeed:[1,2,1,""],debug:[1,2,1,""],internalReset:[1,3,1,""],isRunning:[1,2,1,""],limitMode:[1,2,1,""],limitValue:[1,2,1,""],power:[1,2,1,""],resetTachoCount:[1,3,1,""],setBrake:[1,3,1,""],setProperties:[1,3,1,""],smoothStart:[1,2,1,""],smoothStop:[1,2,1,""],speedRegulation:[1,2,1,""],start:[1,3,1,""],stop:[1,3,1,""],syncedStart:[1,3,1,""],syncedStop:[1,3,1,""],tachoCount:[1,2,1,""],type:[1,2,1,""],waitFor:[1,3,1,""]},"source.Sensor":{debug:[2,2,1,""],mode:[2,2,1,""],reset:[2,3,1,""],setProperties:[2,3,1,""],type:[2,2,1,""],value:[2,2,1,""]},source:{EV3:[6,1,1,""],Motor:[1,1,1,""],Sensor:[2,1,1,""]}},objnames:{"0":["mat","module","MATLAB module"],"1":["mat","class","MATLAB class"],"2":["mat","attribute","MATLAB attribute"],"3":["mat","method","MATLAB method"]},objtypes:{"0":"mat:module","1":"mat:class","2":"mat:attribute","3":"mat:method"},terms:{"5000hz":[0,6],"abstract":4,"case":1,"catch":1,"class":[0,1,2,4,6],"default":2,"function":1,"long":1,"return":[0,1,6],"true":[0,1,6],"try":1,"while":[1,4],aachen:4,abl:4,about:[0,1,2,6],acceler:[1,2],accelerationallax:2,access:4,accident:[0,6],act:1,action:1,actual:1,advanc:4,affect:1,afraid:[],after:[],again:[],all:[0,1,2,6],allow:2,alreadi:1,also:[0,1,6],alternatingli:1,ambient:2,angular:2,ani:1,anoth:1,apply:1,aren:1,around:1,ask:[],automat:[0,1,2,6],avail:2,avoid:[],batteri:[0,6],batterymod:[0,1,6],batterymode:[0,6],batteryvalu:[0,6],been:[0,1,2,6],beep:[0,6],befor:[0,6],behav:1,behaviour:[1,4],better:1,between:1,bit:1,blue:2,bluetooth:[0,4,6],bool:[0,1,2,6],both:1,brake:1,brakemod:1,brick:[0,1,2,4,6],bug:[],buggi:1,bump:2,c_output:1,call:[0,1,2,6],can:[1,2,4],cannot:[],car:1,central:[0,6],chang:1,charg:[0,6],check:[0,1,6],clear:2,coast:1,code:2,col:2,color:2,com:[0,6],comm:[0,6],command:[0,1,2,4,6],comment:1,commun:[1,2,4],confus:[],connect:[0,1,2,6],connectiontyp:[0,6],consist:[1,2],consol:[0,1,2,6],constantli:1,content:[],continu:1,contribut:[],conveni:[0,6],correctli:1,count:1,counter:1,cours:1,creat:[0,1,2,6],current:[0,1,2,6],currentspe:1,dba:2,debug:[0,1,2,6],defin:1,degre:[1,2],delet:[0,6],deliber:[],deliv:[0,6],depend:[0,1,2,6],descript:[],design:4,desir:[],destroi:[0,6],dev:[0,1,2,6],develop:4,devic:1,devicemod:2,devicetyp:[1,2],differ:[0,6],direct:1,directli:4,disconnect:[0,6],distcm:2,distin:2,document:4,doe:[],doesn:1,don:[1,2],done:1,down:1,durat:[0,6],each:[0,1,2,6],eas:1,easili:4,effect:[],either:[0,1,6],enabl:[0,6],equal:[0,1,6],error:[1,2],establish:[0,6],even:1,everytim:[1,2],exampl:[],excerpt:[],execut:1,exit:[],expect:1,explicitli:[],facilit:2,fals:1,far:1,feedback:[0,1,2,6],finish:1,firmwar:[0,1,6],first:[0,1,6],follow:[1,2,4],forward:1,four:1,frequenc:[0,6],from:[0,1,2,6],fun:[0,6],gener:[],germani:4,get:[0,1,6],given:[0,1,6],glanc:[0,6],goe:1,greater:1,green:2,gyro:2,happen:1,have:[0,6],heavi:1,hertz:[0,6],high:[0,1,2,4,6],highest:1,hold:1,how:1,howev:[],htacceleromet:2,htcolor:2,htcompass:2,hyperlink:4,hysic:2,imag:4,immedi:[0,1,6],index:[],indic:1,individu:[1,2],infinit:1,inform:[],infrare:2,input:1,inputpars:[0,1,2,6],instal:4,installat:[],instanc:[1,2],instead:[0,1,2,6],instruct:4,interfac:[0,6],intern:1,internalreset:1,interpret:1,intuit:4,isconnect:[0,6],isrun:1,iter:1,itself:1,keep:1,kind:1,know:[],lab:4,largemotor:2,last:1,later:1,layer:[0,1,2,4,6],lead:1,left:1,less:1,level:[0,1,2,4,6],licens:[],like:1,limit:1,limitmod:1,limitvalu:[0,1,6],link:4,listen:2,load:1,look:4,loop:1,low:[0,4,6],lower:1,mai:1,mainli:2,make:1,manual:[],master:1,mean:1,mediummotor:2,meet:4,messag:1,method:[0,1,6],millisecond:[0,1,6],mind:1,mode:[0,1,2,6],modul:[],mostli:[1,4],motor:[],motora:[0,1,6],motorb:[0,1,6],motorc:[0,6],motord:[0,6],move:1,multipl:[0,1,2,6],name:1,necessari:[],need:[1,2],neg:1,newpag:[],none:2,note:[0,1,2,6],now:[1,2],numer:[0,1,2,6],nxt:4,nxtcolor:2,nxtlight:2,nxtsound:2,nxttemperatur:2,nxttouch:2,nxtultrason:2,object:[0,1,2,6],off:[0,1,2,6],old:1,onc:[0,1,2,6],once:2,onli:1,only:[0,1,2,6],opcod:[0,1,6],opposit:1,optional:[0,6],other:[1,2],otherwis:1,output:[0,6],outputreadi:1,outputtest:1,packet:[0,1,6],page:[],paramet:[0,1,2,6],part:4,pass:[1,2],path:[0,6],paus:[0,6],percent:[0,1,6],percentag:[0,1,6],physic:[0,1,2,6],plai:[0,6],playton:[0,6],point:1,poll:1,port:[0,1,2,6],posit:1,possibl:[1,2],power:[0,1,6],pretti:1,previous:1,print:[0,6],probabl:1,program:1,properti:[0,1,2,6],prox:2,pull:1,push:2,rais:1,rate:2,ratio:1,raw:2,reach:1,read:[0,1,2,4,6],readm:4,realli:[],reason:1,receiv:[0,1,6],red:2,reflect:2,regul:1,releas:1,remot:2,repli:1,repres:[1,2],request:1,reset:[0,1,2,6],resetposit:1,resettachocount:1,respect:1,respons:1,result:1,rfcomm0:[0,1,2,6],rfcomm1:[0,6],rfcomm2:[0,6],right:[1,2],robot:[1,4],run:1,rwth:4,same:[0,1,6],search:[],second:[0,1,6],secur:1,see:[0,1,6],seek:2,seem:[0,6],send:[0,1,4,6],sensor1:[0,2,6],sensor2:[0,6],sensor3:[0,6],sensor4:[0,6],sensor:[],sent:[0,6],serial:[0,6],serport:[0,1,2,6],set:[0,1,2,4,6],setbrak:1,setpow:[],setproperti:[0,1,2,6],setup:[0,6],sever:4,should:1,simplifi:4,slave:1,slow:1,slower:1,slowli:1,smoothli:1,smoothstart:1,smoothstop:1,some:1,sometim:1,somewhat:1,soon:[],sooner:1,sourc:[0,1,2,6],special:[],specifi:2,speed:1,speedregul:1,spin:1,start:[0,1,6],state:1,statu:[0,1,6],still:1,stop:[0,1,6],stopallmotor:[0,6],stopton:[0,6],straight:1,string:[0,6],student:4,stuff:[0,1,6],sublay:[1,2],suppos:1,sync:1,syncedstart:1,syncedstop:1,synchron:1,syncmotor:1,tacho:1,tachocount:1,tacholimit:1,take:[1,4],test:[0,1,6],than:1,them:[0,1,2,6],thi:[0,1,2,4,6],thoroughli:[0,6],tight:[],time:1,timeout:1,tone:[0,6],toneplai:[0,6],too:1,touch:2,tricki:1,turn:[0,1,2,6],turn_ratio:[],turnratio:1,two:1,type:[0,1,2,6],ultrason:2,und:1,undefin:2,unexpect:1,unknown:2,until:1,usb:[0,1,4,6],use:1,user:[0,6],valu:[0,1,2,4,6],varargin:[0,1,2,6],variou:4,via:[0,1,2,4,6],view:[0,6],virtual:[0,6],voltag:[0,1,6],volum:[0,6],wai:4,waitfor:[0,1,6],want:4,wast:1,weird:1,what:[0,1,2,6],whatev:1,when:[0,1,6],which:[1,2],white:2,wide:4,without:1,work:[0,1,2,6],workaround:1,would:1,wrap:[0,6],writable:[0,1,2,6],wrong:[0,6],yet:[0,6],you:[1,2,4],your:4,zero:[]},titles:["EV3","Motor","Sensor","Examples","MATLAB Toolbox for controlling Lego Mindstorms EV3","General","EV3"],titleterms:{content:4,contribut:5,control:4,ev3:[0,4,6],exampl:3,gener:5,indice:[],inform:[],installat:5,lego:4,licens:5,matlab:4,mindstorm:4,motor:1,sensor:2,tabl:[],toolbox:4}}) \ No newline at end of file diff --git a/docs/_build/html/source.html b/docs/_build/html/source.html index d43afef569295adabaf396a099f598e0b33e569e..f093d5eaf1bbcf2d8c58ad814bc7d976edb81784 100644 --- a/docs/_build/html/source.html +++ b/docs/_build/html/source.html @@ -9,8 +9,7 @@ <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" /> - <link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" /> + <link rel="stylesheet" href="_static/bootswatch-3.3.6/readable/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> @@ -32,7 +31,6 @@ <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="top" title="Mindstorms EV3 Toolbox v0.4-rc.10 documentation" href="index.html" /> - <link rel="prev" title="Toolbox for controlling Lego Mindstorms EV3 with MATLAB" href="index.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> @@ -67,10 +65,14 @@ href="index.html">Site <b class="caret"></b></a> <ul class="dropdown-menu globaltoc" role="menu" - aria-labelledby="dLabelGlobalToc"><ul class="current"> -<li class="toctree-l1 current"><a class="current reference internal" href="#">EV3</a></li> -<li class="toctree-l1"><a class="reference internal" href="#motor">Motor</a></li> -<li class="toctree-l1"><a class="reference internal" href="#sensor">Sensor</a></li> + aria-labelledby="dLabelGlobalToc"><ul> +<li class="toctree-l1"><a class="reference internal" href="readme.html">General</a></li> +<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li> +</ul> +<ul> +<li class="toctree-l1"><a class="reference internal" href="EV3.html">EV3</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="Sensor.html">Sensor</a></li> </ul> </ul> </li> @@ -85,8 +87,6 @@ role="menu" aria-labelledby="dLabelLocalToc"><ul> <li><a class="reference internal" href="#">EV3</a></li> -<li><a class="reference internal" href="#motor">Motor</a></li> -<li><a class="reference internal" href="#sensor">Sensor</a></li> </ul> </ul> </li> @@ -95,10 +95,6 @@ - <li> - <a href="index.html" title="Previous Chapter: Toolbox for controlling Lego Mindstorms EV3 with MATLAB"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Toolbox for c...</span> - </a> - </li> @@ -383,548 +379,6 @@ b.tonePlayed() -> Outputs 1 to console. <br /></dd> </dd></dl> -</div> -<div class="section" id="motor"> -<h1>Motor<a class="headerlink" href="#motor" title="Permalink to this headline">¶</a></h1> -<dl class="class"> -<dt id="source.Motor"> -<em class="property">class </em><code class="descclassname">source.</code><code class="descname">Motor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor" title="Permalink to this definition">¶</a></dt> -<dd><p>High-level class to work with motors.</p> -<p>This class is supposed to ease the use of the brick’s motors. It is possible to set all -kinds of parameters, request the current status of the motor ports and of course send -commands to the brick to be executed on the respective port.</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>You don’t need to create instances of this class. The EV3-class automatically creates -instances for each motor port, and you can work with them via the EV3-object.</li> -<li>The Motor-class represents motor ports, not individual motors!</li> -<li>If you start a motor with power=0, the internal state will still be set to -‘isRunning’</li> -</ul> -<dl class="attribute"> -<dt id="source.Motor.power"> -<code class="descname">power</code><a class="headerlink" href="#source.Motor.power" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric in [-100, 100]</em> – Power level of motor in percent. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.speedRegulation"> -<code class="descname">speedRegulation</code><a class="headerlink" href="#source.Motor.speedRegulation" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – Speed regulation turned on or off. When turned on, motor will -try to ‘hold’ its speed at given power level, whatever the load. In this mode, the -highest possible speed depends on the load and mostly goes up to around 70-80 (at -this point, the Brick internally input 100% power). When turned off, motor will -constantly input the same power into the motor. The resulting speed will be -somewhat lower, depending on the load. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.smoothStart"> -<code class="descname">smoothStart</code><a class="headerlink" href="#source.Motor.smoothStart" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric s. t. smoothStart+smoothStop < limitValue</em> – Degrees/Time -indicating how far/long the motor should smoothly start. Depending on limitMode, -the input is interpreted either in degrees or milliseconds. The first -{smoothStart}-milliseconds/degrees of limitValue the motor will slowly accelerate -until reaching its defined speed. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.smoothStop"> -<code class="descname">smoothStop</code><a class="headerlink" href="#source.Motor.smoothStop" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric s. t. smoothStart+smoothStop < limitValue</em> – Degrees/Time -indicating how far/long the motor should smoothly stop. Depending on limitMode, the -input is interpreted either in degrees or milliseconds. The last -[smoothStop]-milliseconds/degrees of limitValue the motor will slowly slow down -until it has stopped. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.limitValue"> -<code class="descname">limitValue</code><a class="headerlink" href="#source.Motor.limitValue" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric>=0</em> – Degrees/Time indicating how far/long the motor should run. -Depending on limitMode, the input is interpreted either in degrees or -milliseconds. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.limitMode"> -<code class="descname">limitMode</code><a class="headerlink" href="#source.Motor.limitMode" title="Permalink to this definition">¶</a></dt> -<dd><p><em>‘Tacho’|’Time’</em> – Mode for motor limit. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.brakeMode"> -<code class="descname">brakeMode</code><a class="headerlink" href="#source.Motor.brakeMode" title="Permalink to this definition">¶</a></dt> -<dd><p><em>‘Brake’|’Coast’</em> – Action done when stopping. If ‘Coast’, the motor will (at -tacholimit, if ~=0) coast to a stop. If ‘Brake’, the motor will stop immediately -(at tacholimit, if ~=0) and hold the brake. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.debug"> -<code class="descname">debug</code><a class="headerlink" href="#source.Motor.debug" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to -the sublayer (‘communication layer’), there is feedback in the console about what -command has been called. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.isRunning"> -<code class="descname">isRunning</code><a class="headerlink" href="#source.Motor.isRunning" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – True if motor is running. <em>[READ-ONLY]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.tachoCount"> -<code class="descname">tachoCount</code><a class="headerlink" href="#source.Motor.tachoCount" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric</em> – Current tacho count. <em>[READ-ONLY]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.currentSpeed"> -<code class="descname">currentSpeed</code><a class="headerlink" href="#source.Motor.currentSpeed" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric</em> – Current speed of motor. If speedRegulation=on this should equal power, -otherwise it will probably be lower than that. <em>[READ-ONLY]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Motor.type"> -<code class="descname">type</code><a class="headerlink" href="#source.Motor.type" title="Permalink to this definition">¶</a></dt> -<dd><p><em>DeviceType</em> – Type of connected device if any. <em>[READ-ONLY]</em></p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.internalReset"> -<code class="descname">internalReset</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.internalReset" title="Permalink to this definition">¶</a></dt> -<dd><p>Resets internal tacho count. Use this if motor behaves weird (i.e. not starting at all, or not correctly -running to limitValue)</p> -<p>The internal tacho count is used for positioning the motor. When the -motor is running with a tacho limit, internally it uses another counter than the -one read by tachoCount. This internal tacho count needs to be reset if you -physically change the motor’s position or it coasted into a stop. If the motor’s -brakemode is ‘Coast’, this function is called automatically.</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>A better name would probably be resetPosition...</li> -<li>Gets called automatically when starting the motor and the internal tacho</li> -</ul> -<p>count is > 0</p> -<p>See also MOTOR.RESETTACHOCOUNT</p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.resetTachoCount"> -<code class="descname">resetTachoCount</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.resetTachoCount" title="Permalink to this definition">¶</a></dt> -<dd><p>Resets tachocount</p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.setBrake"> -<code class="descname">setBrake</code><span class="sig-paren">(</span><em>motor</em>, <em>brake</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.setBrake" title="Permalink to this definition">¶</a></dt> -<dd><p>Apply or release brake of motor</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>brake</strong> (<em>bool</em>) – If true, brake will be pulled</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.setProperties"> -<code class="descname">setProperties</code><span class="sig-paren">(</span><em>motor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.setProperties" title="Permalink to this definition">¶</a></dt> -<dd><p>Sets multiple Motor properties at once using MATLAB’s inputParser.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>debug</strong> (<em>bool</em>) – </li> -<li><strong>smoothStart</strong> (<em>numeric in [0, limitValue]</em>) – </li> -<li><strong>smoothStop</strong> (<em>numeric in [0, limitValue]</em>) – </li> -<li><strong>speedRegulation</strong> (<em>bool</em>) – </li> -<li><strong>brakeMode</strong> (<em>'Coast'|'Brake'</em>) – </li> -<li><strong>limitMode</strong> (<em>'Time'|'Tacho'</em>) – </li> -<li><strong>limitValue</strong> (<em>numeric > 0</em>) – </li> -<li><strong>power</strong> (<em>numeric in [-100,100]</em>) – </li> -<li><strong>batteryMode</strong> (<em>'Voltage'|'Percentage'</em>) – </li> -</ul> -</td> -</tr> -</tbody> -</table> -<p class="rubric">Example</p> -<p>b = EV3(); <br /> -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> -b.motorA.setProperties(‘debug’, ‘on’, ‘power’, 50, ‘limitValue’, 720, ‘speedRegulation’, ‘on’); <br /> -% Instead of: b.motorA.debug = ‘on’; <br /> -% b.motorA.power = 50; <br /> -% b.motorA.limitValue = 720; <br /> -% b.motorA.speedRegulation = ‘on’; <br /></p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.start"> -<code class="descname">start</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.start" title="Permalink to this definition">¶</a></dt> -<dd><p>Starts the motor</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>Right now, alternatingly calling this function with and without tacho limit -may lead to unexpected behaviour. For example, if you run the motor without -a tacholimit for some time using Coast, then stop using Coast, and then try -to run the with a tacholimit, it will stop sooner or later than expected, -or may not even start at all.</li> -<li>(OLD)After calling one of the functions to control the motor with some kind of -limit (which is done if limit~=0), the physical brick’s power/speed value for -starting without a limit (i.e. if limit==0) is reset to zero. So if you want -to control the motor without a limit after doing so with a limit, you would -have to set the power manually to the desired value again. (I don’t really -know if this is deliberate or a bug, and at this point, I’m too afraid to ask.) -To avoid confusion, this is done automatically in this special case. -However, this does not even work all the time. If motor does not -start, call stop() and setPower() manually. :/</li> -</ul> -<p>Check connection and if motor is already running</p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.stop"> -<code class="descname">stop</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.stop" title="Permalink to this definition">¶</a></dt> -<dd><p>Stops the motor</p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.syncedStart"> -<code class="descname">syncedStart</code><span class="sig-paren">(</span><em>motor</em>, <em>syncMotor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.syncedStart" title="Permalink to this definition">¶</a></dt> -<dd><p>Starts this motor synchronized with another</p> -<p>This motor acts as a ‘master’, meaning that the synchronized control is done via -this one. When syncedStart is called, the master sets some of the slave’s -(syncMotor) properties to keep it consistent with the physical brick. So, for -example, changing the power on the master motor will take effect -on the slave as soon as this method is called. -The following parameters will be affected on the slave: power, brakeMode, -limitValue, speedRegulation</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>syncMotor</strong> (<em>Motor</em>) – the motor-object to sync with</li> -<li><strong>turnRatio</strong> (<em>numeric in [-200,200]</em>) – <p><em>[OPTIONAL]</em> <br /> (Excerpt of Firmware-comments, in c_output.c): -“Turn ratio is how tight you turn and to what direction you turn.</p> -<blockquote> -<div><ul> -<li>0 value is moving straight forward</li> -<li>Negative values turn to the left</li> -<li>Positive values turn to the right</li> -<li>Value -100 stops the left motor</li> -<li>Value +100 stops the right motor</li> -<li>Values less than -100 makes the left motor run the opposite direction of the right motor (Spin)</li> -<li>Values greater than +100 makes the right motor run the opposite direction of the left motor (Spin)”</li> -</ul> -</div></blockquote> -</li> -</ul> -</td> -</tr> -</tbody> -</table> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>This is right now a pretty ‘heavy’ function, as it tests if both motors are -connected AND aren’t running, wasting four packets, keep that in mind</li> -<li>It is necessary to call syncedStop() and not stop() for stopping the motors -(otherwise the sync-state cannot be exited correctly)</li> -</ul> -<p class="rubric">Example</p> -<p>b = EV3(); <br /> -b.connect(‘usb’); <br /> -m = b.motorA; <br /> -slave = b.motorB; <br /> -m.power = 50; <br /> -m.syncedStart(slave); <br /> -% Do stuff -m.syncedStop(); <br /></p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.syncedStop"> -<code class="descname">syncedStop</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.syncedStop" title="Permalink to this definition">¶</a></dt> -<dd><p>Stops both motors previously started with syncedStart.</p> -<p>See also MOTOR.SYNCEDSTART</p> -</dd></dl> - -<dl class="method"> -<dt id="source.Motor.waitFor"> -<code class="descname">waitFor</code><span class="sig-paren">(</span><em>motor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Motor.waitFor" title="Permalink to this definition">¶</a></dt> -<dd><p>Stops execution of program as long as motor is running</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>(OLD)This one’s a bit tricky. The opCode OutputReady makes the brick stop sending -responses until the motor has stopped. For security reasons, in this toolbox -there is an internal timeout for receiving messages from the brick. It raises -an error if a reply takes too long, which would happen in this case. As a -workaround, there is an infinite loop that catches errors from outputReady and -continues then, until outputReady will actually finish without an error.</li> -<li>(OLD)OutputReady (like OutputTest in isRunning) sometimes doesn’t work. If -outputReady returns in less than a second, another while-loop iterates until -the motor has stopped, this time using motor.isRunning() (this only works as -long as not both OutputTest and OutputReady are buggy).</li> -<li>(OLD)Workaround: Poll isRunning (which itself return (speed>0)) until it -is false (No need to check if motor is connected as speed correctly -returns 0 if it’s not)</li> -</ul> -</dd></dl> - -</dd></dl> - -</div> -<div class="section" id="sensor"> -<h1>Sensor<a class="headerlink" href="#sensor" title="Permalink to this headline">¶</a></h1> -<dl class="class"> -<dt id="source.Sensor"> -<em class="property">class </em><code class="descclassname">source.</code><code class="descname">Sensor</code><span class="sig-paren">(</span><em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor" title="Permalink to this definition">¶</a></dt> -<dd><p>High-level class to work with sensors.</p> -<p>The Sensor-class facilitates the communication with sensors. This mainly consists of -reading the sensor’s type and current value in a specified mode.</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>You don’t need to create instances of this class. The EV3-class automatically creates -instances for each sensor port, and you can work with them via the EV3-object.</li> -<li>The Sensor-class represents sensor ports, not individual sensors!</li> -</ul> -<dl class="attribute"> -<dt id="source.Sensor.mode"> -<code class="descname">mode</code><a class="headerlink" href="#source.Sensor.mode" title="Permalink to this definition">¶</a></dt> -<dd><p><em>DeviceMode.{Type}</em> – Sensor mode in which the value will be read. By default, -mode is set to DeviceMode.Default.Undefined. Once a physical sensor is connected -to the port <em>and</em> the physical Brick is connected to the EV3-object, the allowed -mode and the default mode for a Sensor-object are the following (depending on the -sensor type): <em>[WRITABLE]</em></p> -<blockquote> -<div><ul> -<li><dl class="first docutils"> -<dt>Touch-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.Touch.Pushed <em>[Default]</em></li> -<li>DeviceMode.Touch.Bumps</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>Ultrasonic-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.UltraSonic.DistCM <em>[Default]</em></li> -<li>DeviceMode.UltraSonic.DistIn</li> -<li>DeviceMode.UltraSonic.Listen</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>Color-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.Color.Reflect <em>[Default]</em></li> -<li>DeviceMode.Color.Ambient</li> -<li>DeviceMode.Color.Col</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>Gyro-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.Gyro.Angular <em>[Default]</em></li> -<li>DeviceMode.Gyro.Rate</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>Infrared-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.InfraRed.Prox <em>[Default]</em></li> -<li>DeviceMode.InfraRed.Seek</li> -<li>DeviceMode.InfraRed.Remote</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTColor-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTColor.Reflect <em>[Default]</em></li> -<li>DeviceMode.NXTColor.Ambient</li> -<li>DeviceMode.NXTColor.Color</li> -<li>DeviceMode.NXTColor.Green</li> -<li>DeviceMode.NXTColor.Blue</li> -<li>DeviceMode.NXTColor.Raw</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTLight-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTLight.Reflect <em>[Default]</em></li> -<li>DeviceMode.NXTLight.Ambient</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTSound-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTSound.DB <em>[Default]</em></li> -<li>DeviceMode.NXTSound.DBA</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTTemperature-Sensor</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTTemperature.C <em>[Default]</em></li> -<li>DeviceMode.NXTTemperature.F</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTTouch-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTTouch.Pushed <em>[Default]</em></li> -<li>DeviceMode.NXTTouch.Bumps</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>NXTUltraSonic-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.NXTUltraSonic.CM <em>[Default]</em></li> -<li>DeviceMode.NXTUltraSonic.IN</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>HTAccelerometer-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.HTAccelerometer.Acceleration <em>[Default]</em></li> -<li>DeviceMode.HTAccelerometer.AccelerationAllAxes</li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>HTCompass-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.HTCompass.Degrees <em>[Default]</em></li> -</ul> -</dd> -</dl> -</li> -<li><dl class="first docutils"> -<dt>HTColor-Sensor:</dt> -<dd><ul class="first last simple"> -<li>DeviceMode.HTColor.Col <em>[Default]</em></li> -<li>DeviceMode.HTColor.Red</li> -<li>DeviceMode.HTColor.Green</li> -<li>DeviceMode.HTColor.Blue</li> -<li>DeviceMode.HTColor.White</li> -<li>DeviceMode.HTColor.Raw</li> -<li>DeviceMode.HTColor.Nr,</li> -<li>DeviceMode.HTColor.All</li> -</ul> -</dd> -</dl> -</li> -</ul> -</div></blockquote> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Sensor.debug"> -<code class="descname">debug</code><a class="headerlink" href="#source.Sensor.debug" title="Permalink to this definition">¶</a></dt> -<dd><p><em>bool</em> – Debug turned on or off. In debug mode, everytime a command is passed to -the sublayer (‘communication layer’), there is feedback in the console about what -command has been called. <em>[WRITABLE]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Sensor.value"> -<code class="descname">value</code><a class="headerlink" href="#source.Sensor.value" title="Permalink to this definition">¶</a></dt> -<dd><p><em>numeric</em> – Value read from hysical sensor. What the value represents depends on -sensor.mode. <em>[READ-ONLY]</em></p> -</dd></dl> - -<dl class="attribute"> -<dt id="source.Sensor.type"> -<code class="descname">type</code><a class="headerlink" href="#source.Sensor.type" title="Permalink to this definition">¶</a></dt> -<dd><p><em>DeviceType</em> – Type of physical sensor connected to the port. Possible types are: [READ-ONLY]</p> -<ul class="simple"> -<li>DeviceType.NXTTouch</li> -<li>DeviceType.NXTLight</li> -<li>DeviceType.NXTSound</li> -<li>DeviceType.NXTColor</li> -<li>DeviceType.NXTUltraSonic</li> -<li>DeviceType.NXTTemperature</li> -<li>DeviceType.LargeMotor</li> -<li>DeviceType.MediumMotor</li> -<li>DeviceType.Touch</li> -<li>DeviceType.Color</li> -<li>DeviceType.UltraSonic</li> -<li>DeviceType.Gyro</li> -<li>DeviceType.InfraRed</li> -<li>DeviceType.HTColor</li> -<li>DeviceType.HTCompass</li> -<li>DeviceType.HTAccelerometer</li> -<li>DeviceType.Unknown</li> -<li>DeviceType.None</li> -<li>DeviceType.Error</li> -</ul> -</dd></dl> - -<dl class="method"> -<dt id="source.Sensor.reset"> -<code class="descname">reset</code><span class="sig-paren">(</span><em>sensor</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor.reset" title="Permalink to this definition">¶</a></dt> -<dd><p>Resets value on sensor</p> -<p class="rubric">Notes</p> -<ul class="simple"> -<li>This clears ALL the sensors right now, no other Op-Code available... :(</li> -</ul> -</dd></dl> - -<dl class="method"> -<dt id="source.Sensor.setProperties"> -<code class="descname">setProperties</code><span class="sig-paren">(</span><em>sensor</em>, <em>varargin</em><span class="sig-paren">)</span><a class="headerlink" href="#source.Sensor.setProperties" title="Permalink to this definition">¶</a></dt> -<dd><p>Sets multiple Sensor properties at once using MATLAB’s inputParser.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>debug</strong> (<em>bool</em>) – </li> -<li><strong>mode</strong> (<em>DeviceMode.{Type}</em>) – </li> -</ul> -</td> -</tr> -</tbody> -</table> -<p class="rubric">Example</p> -<p>b = EV3(); <br /> -b.connect(‘bt’, ‘serPort’, ‘/dev/rfcomm0’); <br /> -b.sensor1.setProperties(‘debug’, ‘on’, ‘mode’, DeviceMode.Color.Ambient); <br /> -% Instead of: b.sensor1.debug = ‘on’; <br /> -% b.sensor1.mode = DeviceMode.Color.Ambient; <br /></p> -</dd></dl> - -</dd></dl> - </div> diff --git a/docs/process.py b/docs/process.py index a669d643c85783eb513765fc185bdb054dc2ccc9..14e26754d2e9fa83bc9a4f855dcfd45226c613e1 100644 --- a/docs/process.py +++ b/docs/process.py @@ -78,7 +78,33 @@ def postprocess(): continue except IOError: pass - + + postprocess_html_files() + +def postprocess_html_files(): + documented_classes = ['Motor', 'Sensor', 'EV3'] + + for file_name in documented_classes: + current_file = os.path.abspath('_build/html/' + file_name + '.html') + try: + fh, abs_path = mkstemp() + with open(current_file, 'r') as f_old: + with open(abs_path, 'w') as f_new: + content = f_old.readlines() + # print('opened ' + current_file) + for i, line in enumerate(content): + if('‘' in line or '’' in line): + f_new.write(line.replace('‘', '\'').replace('’', '\'')) + else: + f_new.write(line) + print('Postprocessed file ' + current_file) + close(fh) + remove(current_file) + move(abs_path, current_file) + except IOError: + print('WARNING: Couldn''t postprocess html-file ' + current_file) + continue + def _ignore_line(line) -> bool: return (line.startswith('%') or line == '\n' or line == '')