Show
Ignore:
Timestamp:
12/02/09 14:43:17 (3 years ago)
Author:
atorf
Message:

Updating livecd branch with fixed see-also links (and fixed motor-tutorial typos)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/livecd/RWTHMindstormsNXT/doc/functions/help/GetSwitch.html

    r823 r840  
    77This HTML is auto-generated from an M-file. 
    88To make changes, update the M-file and republish this document. 
    9       --><title>GetSwitch</title><meta name="generator" content="MATLAB 7.9"><meta name="date" content="2009-10-07"><meta name="m-file" content="script_GetSwitch"> 
     9      --><title>GetSwitch</title><meta name="generator" content="MATLAB 7.9"><meta name="date" content="2009-11-27"><meta name="m-file" content="script_GetSwitch"> 
    1010<link type="text/css" rel="stylesheet" href="../../style.css"> 
    1111  </head><body><div class="content"><h1>GetSwitch</h1><!--introduction--><p>Reads the current value of the NXT switch / touch sensor</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">Syntax</a></li><li><a href="#5">Description</a></li><li><a href="#10">Example</a></li><li><a href="#12">See also</a></li><li><a href="#14">Signature</a></li></ul></div><h2>Syntax<a name="2"></a></h2><p><tt>switch = GetSwitch(port)</tt></p><p><tt>switch = GetSwitch(port, handle)</tt></p><h2>Description<a name="5"></a></h2><p><tt>switch = GetSwitch(port)</tt> returns the current switch value <tt>switch</tt> of the NXT switch / touch sensor. The measurement value <tt>switch</tt> represents the pressing mode of the switch / touch sensor. <tt>true</tt> is returned if the switch / touch sensor is being pressed and <tt>false</tt> if it is being released. The given <tt>port</tt> number specifies the connection port. The value <tt>port</tt> can be addressed by the symbolic constants <tt>SENSOR_1</tt>, <tt>SENSOR_2</tt>, <tt>SENSOR_3</tt> and <tt>SENSOR_4</tt> analog to the labeling on the NXT Brick.</p><p>The last optional argument can be a valid NXT handle. If none is specified, the default handle will be used (call <tt>COM_SetDefaultNXT</tt> to set one).</p><p>For more complex settings the function <tt>NXT_GetInputValues</tt> can be used.</p><h2>Example<a name="10"></a></h2><pre class="codeinput">   OpenSwitch(SENSOR_4); 
    1212   switchState = GetSwitch(SENSOR_4); 
    1313   CloseSensor(SENSOR_4); 
    14 </pre><h2>See also<a name="12"></a></h2><p>NXT_GetInputValues, OpenSwitch, CloseSensor, SENSOR_1, SENSOR_2, SENSOR_3, SENSOR_4</p><h2>Signature<a name="14"></a></h2><div><ul><li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS)</li><li><b>Date:</b> 2008/12/05</li><li><b>Copyright:</b> 2007-2009, RWTH Aachen University</li></ul></div><p class="footer"><br> 
    15 </p></div><!-- 
     14</pre><h2>See also<a name="12"></a></h2><p><a href="NXT_GetInputValues.html">NXT_GetInputValues</a>, <a href="OpenSwitch.html">OpenSwitch</a>, <a href="CloseSensor.html">CloseSensor</a>, <a href="SENSOR_1.html">SENSOR_1</a>, <a href="SENSOR_2.html">SENSOR_2</a>, <a href="SENSOR_3.html">SENSOR_3</a>, <a href="SENSOR_4.html">SENSOR_4</a>, </p><h2>Signature<a name="14"></a></h2><div><ul><li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS)</li><li><b>Date:</b> 2008/12/05</li><li><b>Copyright:</b> 2007-2009, RWTH Aachen University</li></ul></div><p class="footer"><br> 
     15      Published with wg_publish; V1.0<br></p></div><!-- 
    1616##### SOURCE BEGIN ##### 
    1717%% GetSwitch