Index: /branches/atorf/RWTHMindstormsNXT/doc/helpindex.xml
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/helpindex.xml	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/helpindex.xml	(revision 254)
@@ -3,65 +3,80 @@
 
 <index version="1.0">
-  <indexitem target="./functions/help/BT_CloseAllHandles.html">BT_CloseAllHandles</indexitem>
-  <indexitem target="./functions/help/BT_CloseHandle.html">BT_CloseHandle</indexitem>
-  <indexitem target="./functions/help/BT_CollectPacket.html">BT_CollectPacket</indexitem>
-  <indexitem target="./functions/help/BT_CreatePacket.html">BT_CreatePacket</indexitem>
-  <indexitem target="./functions/help/BT_GetDefaultHandle.html">BT_GetDefaultHandle</indexitem>
-  <indexitem target="./functions/help/BT_MakeConfigFile.html">BT_MakeConfigFile</indexitem>
-  <indexitem target="./functions/help/BT_OpenHandle.html">BT_OpenHandle</indexitem>
-  <indexitem target="./functions/help/BT_SendPacket.html">BT_SendPacket</indexitem>
-  <indexitem target="./functions/help/BT_SetDefaultHandle.html">BT_SetDefaultHandle</indexitem>
-  <indexitem target="./functions/help/checkStatusByte.html">checkStatusByte</indexitem>
-  <indexitem target="./functions/help/CloseSensor.html">CloseSensor</indexitem>
-  <indexitem target="./functions/help/GetLight.html">GetLight</indexitem>
-  <indexitem target="./functions/help/GetMemoryCount.html">GetMemoryCount</indexitem>
-  <indexitem target="./functions/help/GetMotor.html">GetMotor</indexitem>
-  <indexitem target="./functions/help/GetMotorSettings.html">GetMotorSettings</indexitem>
-  <indexitem target="./functions/help/GetSound.html">GetSound</indexitem>
-  <indexitem target="./functions/help/GetSwitch.html">GetSwitch</indexitem>
-  <indexitem target="./functions/help/GetUltrasonic.html">GetUltrasonic</indexitem>
-  <indexitem target="./functions/help/MOTOR_A.html">MOTOR_A</indexitem>
-  <indexitem target="./functions/help/MOTOR_B.html">MOTOR_B</indexitem>
-  <indexitem target="./functions/help/MOTOR_C.html">MOTOR_C</indexitem>
-  <indexitem target="./functions/help/MotorRotateAbs.html">MotorRotateAbs</indexitem>
-  <indexitem target="./functions/help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</indexitem>
-  <indexitem target="./functions/help/NXT_GetInputValues.html">NXT_GetInputValues</indexitem>
-  <indexitem target="./functions/help/NXT_GetOutputState.html">NXT_GetOutputState</indexitem>
-  <indexitem target="./functions/help/NXT_LSGetStatus.html">NXT_LSGetStatus</indexitem>
-  <indexitem target="./functions/help/NXT_LSRead.html">NXT_LSRead</indexitem>
-  <indexitem target="./functions/help/NXT_LSWrite.html">NXT_LSWrite</indexitem>
-  <indexitem target="./functions/help/NXT_PlayTone.html">NXT_PlayTone</indexitem>
-  <indexitem target="./functions/help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</indexitem>
-  <indexitem target="./functions/help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</indexitem>
-  <indexitem target="./functions/help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</indexitem>
-  <indexitem target="./functions/help/NXT_SetBrickName.html">NXT_SetBrickName</indexitem>
-  <indexitem target="./functions/help/NXT_SetInputMode.html">NXT_SetInputMode</indexitem>
-  <indexitem target="./functions/help/NXT_SetOutputState.html">NXT_SetOutputState</indexitem>
-  <indexitem target="./functions/help/NXT_StartProgra.html">NXT_StartProgra</indexitem>
-  <indexitem target="./functions/help/NXT_StopProgra.html">NXT_StopProgra</indexitem>
-  <indexitem target="./functions/help/OpenLight.html">OpenLight</indexitem>
-  <indexitem target="./functions/help/OpenSound.html">OpenSound</indexitem>
-  <indexitem target="./functions/help/OpenSwitch.html">OpenSwitch</indexitem>
-  <indexitem target="./functions/help/OpenUltrasonic.html">OpenUltrasonic</indexitem>
-  <indexitem target="./functions/help/readFromIniFile.html">readFromIniFile</indexitem>
-  <indexitem target="./functions/help/ResetMotorAngle.html">ResetMotorAngle</indexitem>
-  <indexitem target="./functions/help/SendMotorSettings.html">SendMotorSettings</indexitem>
-  <indexitem target="./functions/help/SENSOR_1.html">SENSOR_1</indexitem>
-  <indexitem target="./functions/help/SENSOR_2.html">SENSOR_2</indexitem>
-  <indexitem target="./functions/help/SENSOR_3.html">SENSOR_3</indexitem>
-  <indexitem target="./functions/help/SENSOR_4.html">SENSOR_4</indexitem>
-  <indexitem target="./functions/help/SetAngleLimit.html">SetAngleLimit</indexitem>
-  <indexitem target="./functions/help/SetMemoryCount.html">SetMemoryCount</indexitem>
-  <indexitem target="./functions/help/SetMotor.html">SetMotor</indexitem>
-  <indexitem target="./functions/help/SetPower.html">SetPower</indexitem>
-  <indexitem target="./functions/help/SetRampMode.html">SetRampMode</indexitem>
-  <indexitem target="./functions/help/SetTurnRatio.html">SetTurnRatio</indexitem>
-  <indexitem target="./functions/help/SpeedRegulation.html">SpeedRegulation</indexitem>
-  <indexitem target="./functions/help/StopMotor.html">StopMotor</indexitem>
-  <indexitem target="./functions/help/SwitchLamp.html">SwitchLamp</indexitem>
-  <indexitem target="./functions/help/SyncToMotor.html">SyncToMotor</indexitem>
-  <indexitem target="./functions/help/textOut.html">textOut</indexitem>
-  <indexitem target="./functions/help/tictic.html">tictic</indexitem>
-  <indexitem target="./functions/help/toctoc.html">toctoc</indexitem>
-  <indexitem target="./functions/help/WaitForMotor.html">WaitForMotor</indexitem>
+<indexitem target="./functions/help/COM_CloseNXT.html">COM_CloseNXT</indexitem>
+<indexitem target="./functions/help/COM_CollectPacket.html">COM_CollectPacket</indexitem>
+<indexitem target="./functions/help/COM_CreatePacket.html">COM_CreatePacket</indexitem>
+<indexitem target="./functions/help/COM_GetDefaultNXT.html">COM_GetDefaultNXT</indexitem>
+<indexitem target="./functions/help/COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</indexitem>
+<indexitem target="./functions/help/COM_OpenNXT.html">COM_OpenNXT</indexitem>
+<indexitem target="./functions/help/COM_OpenNXTEx.html">COM_OpenNXTEx</indexitem>
+<indexitem target="./functions/help/COM_SendPacket.html">COM_SendPacket</indexitem>
+<indexitem target="./functions/help/COM_SetDefaultNXT.html">COM_SetDefaultNXT</indexitem>
+<indexitem target="./functions/help/CloseSensor.html">CloseSensor</indexitem>
+<indexitem target="./functions/help/Contents.html">Contents</indexitem>
+<indexitem target="./functions/help/DebugMode.html">DebugMode</indexitem>
+<indexitem target="./functions/help/GetLight.html">GetLight</indexitem>
+<indexitem target="./functions/help/GetMemoryCount.html">GetMemoryCount</indexitem>
+<indexitem target="./functions/help/GetMotor.html">GetMotor</indexitem>
+<indexitem target="./functions/help/GetMotorSettings.html">GetMotorSettings</indexitem>
+<indexitem target="./functions/help/GetSound.html">GetSound</indexitem>
+<indexitem target="./functions/help/GetSwitch.html">GetSwitch</indexitem>
+<indexitem target="./functions/help/GetUltrasonic.html">GetUltrasonic</indexitem>
+<indexitem target="./functions/help/MAP_GetCommModule.html">MAP_GetCommModule</indexitem>
+<indexitem target="./functions/help/MAP_GetInputModule.html">MAP_GetInputModule</indexitem>
+<indexitem target="./functions/help/MAP_GetOutputModule.html">MAP_GetOutputModule</indexitem>
+<indexitem target="./functions/help/MAP_GetSoundModule.html">MAP_GetSoundModule</indexitem>
+<indexitem target="./functions/help/MAP_GetUIModule.html">MAP_GetUIModule</indexitem>
+<indexitem target="./functions/help/MAP_SetOutputModule.html">MAP_SetOutputModule</indexitem>
+<indexitem target="./functions/help/MOTOR_A.html">MOTOR_A</indexitem>
+<indexitem target="./functions/help/MOTOR_B.html">MOTOR_B</indexitem>
+<indexitem target="./functions/help/MOTOR_C.html">MOTOR_C</indexitem>
+<indexitem target="./functions/help/MotorRotateAbs.html">MotorRotateAbs</indexitem>
+<indexitem target="./functions/help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</indexitem>
+<indexitem target="./functions/help/NXT_GetFirmwareVersion.html">NXT_GetFirmwareVersion</indexitem>
+<indexitem target="./functions/help/NXT_GetInputValues.html">NXT_GetInputValues</indexitem>
+<indexitem target="./functions/help/NXT_GetOutputState.html">NXT_GetOutputState</indexitem>
+<indexitem target="./functions/help/NXT_LSGetStatus.html">NXT_LSGetStatus</indexitem>
+<indexitem target="./functions/help/NXT_LSRead.html">NXT_LSRead</indexitem>
+<indexitem target="./functions/help/NXT_LSWrite.html">NXT_LSWrite</indexitem>
+<indexitem target="./functions/help/NXT_PlaySoundFile.html">NXT_PlaySoundFile</indexitem>
+<indexitem target="./functions/help/NXT_PlayTone.html">NXT_PlayTone</indexitem>
+<indexitem target="./functions/help/NXT_ReadIOMap.html">NXT_ReadIOMap</indexitem>
+<indexitem target="./functions/help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</indexitem>
+<indexitem target="./functions/help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</indexitem>
+<indexitem target="./functions/help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</indexitem>
+<indexitem target="./functions/help/NXT_SetBrickName.html">NXT_SetBrickName</indexitem>
+<indexitem target="./functions/help/NXT_SetInputMode.html">NXT_SetInputMode</indexitem>
+<indexitem target="./functions/help/NXT_SetOutputState.html">NXT_SetOutputState</indexitem>
+<indexitem target="./functions/help/NXT_StartProgram.html">NXT_StartProgram</indexitem>
+<indexitem target="./functions/help/NXT_StopProgram.html">NXT_StopProgram</indexitem>
+<indexitem target="./functions/help/NXT_StopSoundPlayback.html">NXT_StopSoundPlayback</indexitem>
+<indexitem target="./functions/help/NXT_WriteIOMap.html">NXT_WriteIOMap</indexitem>
+<indexitem target="./functions/help/OpenLight.html">OpenLight</indexitem>
+<indexitem target="./functions/help/OpenSound.html">OpenSound</indexitem>
+<indexitem target="./functions/help/OpenSwitch.html">OpenSwitch</indexitem>
+<indexitem target="./functions/help/OpenUltrasonic.html">OpenUltrasonic</indexitem>
+<indexitem target="./functions/help/ResetMotorAngle.html">ResetMotorAngle</indexitem>
+<indexitem target="./functions/help/SENSOR_1.html">SENSOR_1</indexitem>
+<indexitem target="./functions/help/SENSOR_2.html">SENSOR_2</indexitem>
+<indexitem target="./functions/help/SENSOR_3.html">SENSOR_3</indexitem>
+<indexitem target="./functions/help/SENSOR_4.html">SENSOR_4</indexitem>
+<indexitem target="./functions/help/SendMotorSettings.html">SendMotorSettings</indexitem>
+<indexitem target="./functions/help/SetAngleLimit.html">SetAngleLimit</indexitem>
+<indexitem target="./functions/help/SetMemoryCount.html">SetMemoryCount</indexitem>
+<indexitem target="./functions/help/SetMotor.html">SetMotor</indexitem>
+<indexitem target="./functions/help/SetPower.html">SetPower</indexitem>
+<indexitem target="./functions/help/SetRampMode.html">SetRampMode</indexitem>
+<indexitem target="./functions/help/SetTurnRatio.html">SetTurnRatio</indexitem>
+<indexitem target="./functions/help/SpeedRegulation.html">SpeedRegulation</indexitem>
+<indexitem target="./functions/help/StopMotor.html">StopMotor</indexitem>
+<indexitem target="./functions/help/SwitchLamp.html">SwitchLamp</indexitem>
+<indexitem target="./functions/help/SyncToMotor.html">SyncToMotor</indexitem>
+<indexitem target="./functions/help/USGetSnapshotResults.html">USGetSnapshotResults</indexitem>
+<indexitem target="./functions/help/USMakeSnapshot.html">USMakeSnapshot</indexitem>
+<indexitem target="./functions/help/WaitForMotor.html">WaitForMotor</indexitem>
+<indexitem target="./functions/help/checkStatusByte.html">checkStatusByte</indexitem>
+<indexitem target="./functions/help/readFromIniFile.html">readFromIniFile</indexitem>
+<indexitem target="./functions/help/textOut.html">textOut</indexitem>
+<indexitem target="./functions/help/tictic.html">tictic</indexitem>
+<indexitem target="./functions/help/toctoc.html">toctoc</indexitem>
 </index>
Index: /branches/atorf/RWTHMindstormsNXT/doc/programming/programming_robots.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/programming/programming_robots.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/programming/programming_robots.html	(revision 254)
@@ -10,4 +10,5 @@
 <h1>Programming Robots</h1>
 <hr>
+<h4>Warning - Information in this section might still be from version 1.00 and hence be outdated!</h4>
 
 After a Mindstorms NXT robot is constructed and built, its behavior should be programmed. Therefore the following sections describe the RWTH - Mindstorms NXT Toolbox commands and give program design tips.
Index: /branches/atorf/RWTHMindstormsNXT/doc/release.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/release.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/release.html	(revision 254)
@@ -10,29 +10,44 @@
 <h1>Release Notes &amp; Version History</h1>
 <hr>
-<h2>RWTH - Mindstorms NXT Toolbox v1.00</h2>
-<ul>
-  <li><b>New Features:</b></li>
-  <ul>
-    <li>Extended and updated toolbox documentation.</li>
-    <li>Functions features based on modules release-1.00  (January 22nd, 2008)</li>
-    <ul>
-      <li><b>Features added:</b></li>
-      <ul>
-        <li>Warning- and Error-identifiers for all warnings and errors</li>
-		<li>Contents.m (Toolbox and version identification)</li>
-		<li>Performance improvements in various private lowlevel functions</li>
-      </ul>
-	  <li><b>Features changed:</b></li>
-	  <ul>
-        <li>readFromIniFile.m (completely new rewritten code, more reliable, better understandable, GPL license)</li>
-		<li>Changed, improved and added lots of comments</li>
-		<li>Changed default Bluetooth parameters to lower (i.e. faster) values</li>
-		<li>New version naming scheme: x.yy, where x = major version (ensuring backwards compatibility) and yy = release number, e.g. 1.01
-      </ul>
-      <li><b>Bugs fixed:</b></li>
-    </ul>
-  </ul>
-  <li>January 24th, 2008</li>
-</ul>
+<h2>RWTH - Mindstorms NXT Toolbox version 2.00beta</h2>
+<ul>
+  <li><b>New Features:</b></li>
+  <ul>
+    <li>Added support for USB communication to the NXT brick (for both Windows and Linux systems):<br>
+		Performance about 10 times faster than with Bluetooth communication.</li>
+	<li>Restructured communication layer: New functions for Bluetooth and USB communication.</li>
+	<li>Full support for multiple NXTs from one program, mixed connections via Bluetooth and USB are supported.</li>
+	<li>New NXT-handle holds useful information about the currently connected device.</li>
+	<li>Added "snapshot mode" for ultrasonic sensor: Send single pings and record multiple echos.<br>
+	    (See functions OpenUltrasonic, USMakeSnapshot, and USGetSnapshotResults)</li>
+	<li>Added support for I/O Map Module access of NXT internal registers: See MAP-functions.</li>
+	<li>New function DebugMode for easier access to debug messages generated by textOut.</li>
+  </ul>
+  <li><b>Bug fixes and improvements:</b></li>
+  <ul>
+	<li>Performance improvement (roughly factor 10) of lowlevel functions wordbytes2dec and dec2wordbytes.</li>
+	<li>Fixed a minor bug in SpeedRegulation that occured when working with value 255 for all motors.</li>
+	<li>Added and rewrote some internal helper / lowlevel functions.</li>
+	<li>Added and rewrote some error / warning messages.</li>
+  </ul>
+  <li><b>Files removed:</b></li>
+  <ul>
+	<li>Old BT-functions (Bluetooth) have now been replaced by COM-Functions that also support USB-connections.</li>
+	<li>Removed some private lowlevel functions that were not needed anymore.</li>
+  </ul>
+  <li><b>Known bugs and limitations:</b></li>
+  <ul>
+	<li>Current documentation might be outdated (still from version 1.00 at various places).</li>
+	<li>Programs working with toolbox version 1.00 are not working out of the box with version 2.00beta. The code for opening
+	    and closing connections to the NXT brick has to be updated.</li>
+	<li>System functions, especially the new I/O Map Module functions, do not work with USB-connections in Windows.</li>
+	<li>Under heavy load / small intervals between successive sensor polls (when using USB connections), the NXT might send
+     	an error message back to the host computer, leading to a warning. This was not reproducable realiably.</li>
+	<li>Old limitations from version 1.00 regarding hardware compatibility and problems with various Bluetooth adapters still apply.</li>
+  </ul>
+  
+  <li>July 17th, 2008</li>
+</ul>
+
 
 <br>
@@ -45,7 +60,7 @@
     info = 
        Name: 'RWTH - Mindstorms NXT Toolbox'
-    Version: '1.00'
+    Version: '2.00beta'
     Release: ''
-       Date: '24-Jan-2008'
+       Date: '17-Jul-2008'
 </pre>
 If your application requires a certain toolbox release, you can use this command to ensure the requested version is present:
@@ -58,7 +73,33 @@
 <br>
 
-
 <hr>
 <h2>Version History</h2>
+
+
+<h3>RWTH - Mindstorms NXT Toolbox v1.00</h3>
+<ul>
+  <li><b>New Features:</b></li>
+  <ul>
+    <li>Extended and updated toolbox documentation.</li>
+    <li>Functions features based on modules release-1.00  (January 22nd, 2008)</li>
+    <ul>
+      <li><b>Features added:</b></li>
+      <ul>
+        <li>Warning- and Error-identifiers for all warnings and errors</li>
+		<li>Contents.m (Toolbox and version identification)</li>
+		<li>Performance improvements in various private lowlevel functions</li>
+      </ul>
+	  <li><b>Features changed:</b></li>
+	  <ul>
+        <li>readFromIniFile.m (completely new rewritten code, more reliable, better understandable, GPL license)</li>
+		<li>Changed, improved and added lots of comments</li>
+		<li>Changed default Bluetooth parameters to lower (i.e. faster) values</li>
+		<li>New version naming scheme: x.yy, where x = major version (ensuring backwards compatibility) and yy = release number, e.g. 1.01
+      </ul>
+      <li><b>Bugs fixed:</b></li>
+    </ul>
+  </ul>
+  <li>January 24th, 2008</li>
+</ul>
 
 <h3>RWTH - Mindstorms NXT Toolbox v0.3</h3>
Index: /branches/atorf/RWTHMindstormsNXT/doc/acknowledgements.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/acknowledgements.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/acknowledgements.html	(revision 254)
@@ -31,5 +31,5 @@
 
 
-<h2>Promoters:</h2>
+<h2>Faculty:</h2>
 Prof. Til Aach, Prof. Tobias G. Noll, Achim Knepper
 
@@ -41,5 +41,5 @@
 All contributors are members of the <a href="http://www.rwth-aachen.de">RWTH Aachen University</a>.
 <p></p>
-RWTH Aachen University Student Project <a href="http://www.lfb.rwth-aachen.de/de/lehre/ws07/mindstorms.html">MATLAB meets LEGO Mindstorms</a>.
+RWTH Aachen University First Semester Student Project <a href="http://www.lfb.rwth-aachen.de/mindstorms">MATLAB meets LEGO Mindstorms</a>.
 
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/helptoc.xml
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/helptoc.xml	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/helptoc.xml	(revision 254)
@@ -53,5 +53,5 @@
   <tocitem target="./functions/categories.html" image="$toolbox/matlab/icons/reficon.gif">Functions - By Category</tocitem>
   <tocitem target="./functions/abc.html" image="$toolbox/matlab/icons/reficon.gif">Functions - Alphabetical List</tocitem>
-  <tocitem target="./functions/FunctionsOverview.html" image="$toolbox/matlab/icons/reficon.gif">Functions - Overview</tocitem>  
+  <tocitem target="./functions/ToolboxVer2Guidelines.html" image="$toolbox/matlab/icons/reficon.gif">Functions - Guideline for new v2.00 features</tocitem>  
   <tocitem target="./functions/CommandLayers.html" image="$toolbox/matlab/icons/reficon.gif">Functions - Command Layers</tocitem>
   
@@ -65,11 +65,13 @@
   
   <!-- Demos -->
+  <!--
   <tocitem target="./demos/watchAnalogSensor_gui.html" image="$toolbox/matlab/icons/figureicon.gif">Watch Analog Sensor GUI</tocitem>
   <tocitem target="./demos/watchMotorState_gui.html" image="$toolbox/matlab/icons/figureicon.gif">Watch Motor State GUI</tocitem>
+  -->
   
   <!-- Web Pages -->
   <tocitem target="./webpages.html" image="$toolbox/matlab/icons/webicon.gif">Web Pages
     <tocitem target="http://www.mindstorms.rwth-aachen.de" image="$toolbox/matlab/icons/webicon.gif">RWTH - Mindstorms NXT Toolbox - Official Web Page</tocitem>
-    <tocitem target="http://www.lfb.rwth-aachen.de/de/lehre/ws07/mindstorms.html" image="$toolbox/matlab/icons/webicon.gif">RWTH Project - MATLAB meets LEGO Mindstorms -</tocitem>
+    <tocitem target="http://www.lfb.rwth-aachen.de/mindstorms.html" image="$toolbox/matlab/icons/webicon.gif">RWTH Project - MATLAB meets LEGO Mindstorms -</tocitem>
     <tocitem target="http://www.lfb.rwth-aachen.de/en" image="$toolbox/matlab/icons/webicon.gif">RWTH - Institute of Imaging and Computer Vision</tocitem>
     <tocitem target="http://www.rwth-aachen.de" image="$toolbox/matlab/icons/webicon.gif">RWTH Aachen University</tocitem>
Index: /branches/atorf/RWTHMindstormsNXT/doc/start/requirements.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/start/requirements.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/start/requirements.html	(revision 254)
@@ -18,4 +18,5 @@
   <li>LEGO<SUP>&reg;</SUP> Mindstorms NXT firmware v1.05 (recommended)</li>
   <li>Bluetooth 2.0 adapter recommended model by LEGO<SUP>&reg;</SUP> (e.g. AVM BlueFRITZ! USB) supporting the serial port profile (SPP)</li>
+  <li>USB cable and LEGO Mindstorms NXT Fantom USB Driver for Windows (http://mindstorms.lego.com/support/updates/) or libusb library for Linux</li>
 </ul>
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/webpages.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/webpages.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/webpages.html	(revision 254)
@@ -13,6 +13,6 @@
 <ul>
   <li><a href="http://www.mindstorms.rwth-aachen.de">RWTH - Mindstorms NXT Toolbox - Official Web Page</a></li>
-  <li><a href="http://www.lfb.rwth-aachen.de/de/lehre/ws07/mindstorms.html">RWTH Aachen University Student Project - MATLAB meets LEGO Mindstorms -</a></li>
-  <li><a href="http://www.rwth-aachen.de">RWTH - Institute of Imaging and Computer Vision</a></li>
+  <li><a href="http://www.lfb.rwth-aachen.de/mindstorms">RWTH Aachen University First Semester Student Project - MATLAB meets LEGO Mindstorms -</a></li>
+  <li><a href="http://www.lfb.rwth-aachen.de">RWTH - Institute of Imaging and Computer Vision</a></li>
   <li><a href="http://www.rwth-aachen.de">RWTH Aachen University</a></li>
   <li><a href="http://www.mindstorms.com">LEGO Mindstorms NXT- Official Webpage</a></li>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/ToolboxVer2Guidelines.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/ToolboxVer2Guidelines.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/ToolboxVer2Guidelines.html	(revision 254)
@@ -0,0 +1,427 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>RWTH - Mindstorms NXT Toolbox Version 2.00 beta Guidelines</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="ToolboxVer2Guidelines"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>RWTH - Mindstorms NXT Toolbox Version 2.00 beta Guidelines</h1>
+         <introduction>
+            <p>This document describes the main changes in version 2.00 beta of this toolbox and gives a short introduction on how to use
+               them!
+            </p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">The communication layer</a></li>
+               <li><a href="#5">Opening connections and retrieving handles</a></li>
+               <li><a href="#8">The handle struct</a></li>
+               <li><a href="#11">Default handles</a></li>
+               <li><a href="#12">Closing handles and cleaning up</a></li>
+               <li><a href="#16">New debug functions</a></li>
+               <li><a href="#22">New "snapshot" mode for ultrasonic sensor</a></li>
+               <li><a href="#23">New I/O Map Module access</a></li>
+               <li><a href="#25">Conclusion</a></li>
+               <li><a href="#27">Contact</a></li>
+            </ul>
+         </div>
+         <h2>The communication layer<a name="1"></a></h2>
+         <p>To establish a connection to an NXT device, the following functions are provided:</p>
+         <div>
+            <ul>
+               <li><tt>COM_OpenNXT</tt></li>
+               <li><tt>COM_OpenNXTEx</tt></li>
+               <li><tt>COM_CloseNXT</tt></li>
+               <li><tt>COM_SetDefaultNXT</tt></li>
+               <li><tt>COM_GetDefaultNXT</tt></li>
+            </ul>
+         </div>
+         <p>They replace the old <tt>BT_</tt> functions from toolbox version 1.00. Also <tt>BT_CreatePacket</tt>, <tt>BT_SendPacket</tt>, and <tt>BT_CollectPacket</tt> have been replaced by <tt>COM_CreatePacket</tt>, <tt>COM_SendPacket</tt>, and <tt>COM_CollectPacket</tt>. These changes are only to be consistent with the naming scheme, the usage of these functions has not changed. The prefix
+            <tt>COM_</tt> stands for "communication functions".
+         </p>
+         <p>The most important change in toolbox version 2.00 is the support for USB connections. On Windows systems, the Mindstorms NXT
+            device driver (called "Fantom") has to be installed. On Linux systems, the free open source library libusb is used. Additionally,
+            the devices' access rights have to be modified so that the NXT bricks appear in <tt>/dev/</tt>.
+         </p>
+         <h2>Opening connections and retrieving handles<a name="5"></a></h2>
+         <p>The following way is recommended to open a connection:</p><pre class="codeinput">h = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(h);
+</pre><p>This replaces what looked like this in toolbox version 1.00:</p><pre class="codeinput">h = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+BT_SetDefaultHandle(h);
+</pre><p>The big difference however is that <tt>COM_OpenNXT</tt> will also look on the USB bus for an NXT. If it succeeds, the USB connection will be used, otherwise a Bluetooth connection
+            is created. This makes the above example work with both Bluetooth and USB connections without having to change the code! Just
+            plug or unplug the USB cable to your NXT device. If USB is present, it will be used, if not, Bluetooth comes into action.
+         </p>
+         <h2>The handle struct<a name="8"></a></h2>
+         <p>In version 1.00 our NXT handle was just a variable (serial object on Windows, file handle on Linux). Now, we have a fairly
+            large struct, containing lots of useful (and necessary) information. The users do NOT have to use this handle in any way but
+            to pass it to functions, just as they could in earlier versions. All other functions and commands just work as they did before!
+         </p>
+         <p>The handle contains some function-handles (to store dynamic information using the principle of function closures). However
+            they are not to be used by normal users! It will later be explained to the advanced user how to retrieve connection statistics
+            (how many bytes and packets were sent or received).
+         </p>
+         <p>For now, the message is: We have got a huge handle struct, look at it if you want, but do not modify it. It does not matter
+            what is in there, everything just works, so no need to bother!
+         </p>
+         <h2>Default handles<a name="11"></a></h2>
+         <p>To put it simply: <tt>BT_SetDefaultHandle</tt> and <tt>BT_GetDefaultHandle</tt> have just been replaced by <tt>COM_SetDefaultNXT</tt> and <tt>COM_GetDefaultNXT</tt>. So adapt your code, the syntax is exactly the same.
+         </p>
+         <h2>Closing handles and cleaning up<a name="12"></a></h2>
+         <p>The two functions <tt>BT_CloseHandle</tt> and <tt>BT_CloseAllHandles</tt> have been combined to the one function <tt>COM_CloseNXT</tt>.
+         </p>
+         <p>To clean up after using your NXT-handle, just call</p><pre class="codeinput">COM_CloseNXT(h);
+clear <span class="string">h</span> <span class="comment">% this is not necessary but good practice, so I recommend it</span>
+</pre><p>Instead of <tt>BT_CloseAllHandles</tt> we now have:
+         </p><pre class="codeinput">COM_CloseNXT <span class="string">all</span>
+</pre><p>The old way of closing just a specific serial port has been mapped to this syntax:</p><pre class="codeinput">COM_CloseNXT(<span class="string">'all'</span>, <span class="string">'bluetooth.ini'</span>);
+</pre><h2>New debug functions<a name="16"></a></h2>
+         <p>The way the function <tt>textOut</tt> behaves has not changed. But it was quite uncomfortable to use <tt>global DisableScreenOut</tt> in order to enable or disable debug messages. So we now have helper functions:
+         </p><pre class="codeinput">DebugMode <span class="string">on</span>
+    <span class="comment">% do something</span>
+DebugMode <span class="string">off</span>
+</pre><p><tt>DebugMode(state)</tt> is a method that can set the debug-state, but when called without any arguments, <tt>DebugMode()</tt> will return the current setting. So if we want to remember and restore the previous state, we can do so by:
+         </p><pre class="codeinput">OldDebugState = DebugMode(); <span class="comment">% remember old state</span>
+DebugMode <span class="string">on</span>  <span class="comment">% force it to always be on</span>
+    <span class="comment">% do something with guaranteed debug infos</span>
+DebugMode(OldDebugState); <span class="comment">% be polite, reset to old state</span>
+</pre><p>To check if debug messages are enabled, use:</p><pre class="codeinput"><span class="keyword">if</span> isdebug
+    <span class="comment">% we know debug mode is set to 'on'</span>
+<span class="keyword">end</span><span class="comment">%if</span>
+</pre><p>This is essentially the same as</p><pre class="codeinput"><span class="keyword">if</span> strcmpi(DebugMode(), <span class="string">'on'</span>)
+    <span class="comment">% we know debug mode is set to 'on'</span>
+<span class="keyword">end</span><span class="comment">%if</span>
+</pre><p>but since MATLAB is not very fast with string comparisons, I recommend to use <tt>isdebug</tt> where time is critical. Also it is easier.
+         </p>
+         <p>Please note the similarity to MATLAB's built-in functions <tt>hold on</tt>, <tt>hold off</tt> and <tt>ishold</tt>.
+         </p>
+         <h2>New "snapshot" mode for ultrasonic sensor<a name="22"></a></h2>
+         <p>The function <tt>OpenUltrasonic</tt> has been updated with the additional optional parameter <tt>'snapshot'</tt>. When set, the functions <tt>USMakeSnapshot</tt> and <tt>USGetSnapshotResults</tt> enable you to send out a single "ping" signal, and let the sensor record up to 8 following echos. All 8 recordings can then
+            be retrieved in one step. See function help for further information. An example might look like this:
+         </p><pre class="codeinput">port = SENSOR_4;
+OpenUltrasonic(port, <span class="string">'snapshot'</span>);
+<span class="comment">% send out the ping</span>
+USMakeSnapshot(port);
+<span class="comment">% wait some time for the sound to travel</span>
+pause(0.1); <span class="comment">% 100ms is probably too much, calculate using c_sound ;-)</span>
+<span class="comment">% retrieve all the echos in 1 step</span>
+echos = USGetSnapshotResults(port);
+CloseSensor(port);
+</pre><h2>New I/O Map Module access<a name="23"></a></h2>
+         <p>New system functions <tt>NXT_ReadIOMap</tt> and <tt>NXT_WriteIOMap</tt> have been implemented, enabling low-level access to the NXT's internal I/O map module registers. For easier usage, some high
+            level functions have been implemented. They all start with the prefix <tt>MAP_</tt>, see list of functions and their documentation for further information.
+         </p>
+         <p>Note: These new functions do not (yet?) work under Windows when using USB connections. They do however work with Bluetooth
+            under Windows. On Linux systems, both USB and Bluetooth connections are supported for I/O map module access.
+         </p>
+         <h2>Conclusion<a name="25"></a></h2>
+         <p>To sum up all necessary changes for your programs:</p>
+         <div>
+            <ul>
+               <li>Replace <tt>BT_OpenHandle</tt> with <tt>COM_OpenNXT</tt>, syntax stays the same. If   you want, you can also use <tt>COM_OpenNXTEx</tt>, but then a more complex   syntax comes into place.
+               </li>
+               <li>Replace <tt>BT_SetDefaultHandle</tt> with <tt>COM_SetDefaultNXT</tt> and   <tt>BT_GetDefaultHandle</tt> with <tt>COM_GetDefaultNXT</tt>.
+               </li>
+               <li>Replace <tt>BT_CloseHandle(h)</tt> with <tt>COM_CloseNXT(h)</tt>.
+               </li>
+               <li>Replace <tt>BT_CloseAllHandles()</tt> with <tt>COM_CloseNXT('all')</tt>.
+               </li>
+               <li>Replace <tt>BT_CloseAllHandles('bluetooth.ini')</tt> with   <tt>COM_CloseNXT('all', 'bluetooth.ini')</tt>.
+               </li>
+               <li>Instead of modifying the global variable <tt>DisableScreenOut</tt> for   debug-messages by <tt>textOut</tt>, the two new easy functions <tt>DebugMode()</tt>   and <tt>isdebug</tt> are available.
+               </li>
+            </ul>
+         </div>
+         <h2>Contact<a name="27"></a></h2>
+         <p>Please feel free to contact me by mail if you have comments:</p>
+         <p>linus (dot) atorf (at) rwth-aachen (dot) de</p>
+         <p>or via <a href="www.mindstorms.rwth-aachen.de">www.mindstorms.rwth-aachen.de</a></p>
+         <p><i>Version 1.01 of this document, Linus Atorf, July 18th 2008</i></p>
+         <p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% RWTH - Mindstorms NXT Toolbox Version 2.00 beta Guidelines
+% This document describes the main changes in version 2.00 beta of this
+% toolbox and gives a short introduction on how to use them!
+% 
+
+%% The communication layer
+% To establish a connection to an NXT device, the following functions are
+% provided:
+
+%%
+% * |COM_OpenNXT|
+% * |COM_OpenNXTEx|
+% * |COM_CloseNXT|
+% * |COM_SetDefaultNXT|
+% * |COM_GetDefaultNXT|
+
+%%
+% They replace the old |BT_| functions from toolbox version 1.00. Also
+% |BT_CreatePacket|, |BT_SendPacket|, and |BT_CollectPacket| have been
+% replaced by |COM_CreatePacket|, |COM_SendPacket|, and
+% |COM_CollectPacket|. These changes are only to be consistent with the
+% naming scheme, the usage of these functions has not changed. The prefix
+% |COM_| stands for "communication functions".
+
+%% 
+% The most important change in toolbox version 2.00 is the support for USB
+% connections. On Windows systems, the Mindstorms NXT device driver (called
+% "Fantom") has to be installed. On Linux systems, the free open source
+% library libusb is used. Additionally, the devices' access rights have to
+% be modified so that the NXT bricks appear in |/dev/|.
+
+
+%% Opening connections and retrieving handles
+% The following way is recommended to open a connection:
+
+h = COM_OpenNXT('bluetooth.ini', 'check');
+COM_SetDefaultNXT(h);
+
+%%
+% This replaces what looked like this in toolbox version 1.00:
+h = BT_OpenHandle('bluetooth.ini', 'check');
+BT_SetDefaultHandle(h);
+
+%% 
+% The big difference however is that |COM_OpenNXT| will also look on the
+% USB bus for an NXT. If it succeeds, the USB connection will be used,
+% otherwise a Bluetooth connection is created.
+% This makes the above example work with both Bluetooth and USB connections
+% without having to change the code!
+% Just plug or unplug the USB cable to your NXT device. If USB is present,
+% it will be used, if not, Bluetooth comes into action.
+
+
+%% The handle struct
+% In version 1.00 our NXT handle was just a variable (serial object on
+% Windows, file handle on Linux). Now, we have a fairly large struct,
+% containing lots of useful (and necessary) information.
+% The users do NOT have to use this handle in any way but to pass it to
+% functions, just as they could in earlier versions.
+% All other functions and commands just work as they did before!
+
+%%
+% The handle contains some function-handles (to store dynamic information
+% using the principle of function closures). However they are not to be
+% used by normal users! It will later be explained to the advanced user
+% how to retrieve connection statistics (how many bytes and packets were
+% sent or received).
+
+%%
+% For now, the message is: We have got a huge handle struct, look at it if
+% you want, but do not modify it. It does not matter what is in there,
+% everything just works, so no need to bother!
+
+
+%% Default handles
+% To put it simply: |BT_SetDefaultHandle| and |BT_GetDefaultHandle| have
+% just been replaced by |COM_SetDefaultNXT| and |COM_GetDefaultNXT|. So
+% adapt your code, the syntax is exactly the same.
+
+
+%% Closing handles and cleaning up
+% The two functions |BT_CloseHandle| and |BT_CloseAllHandles| have been
+% combined to the one function |COM_CloseNXT|.
+
+%%
+% To clean up after using your NXT-handle, just call
+
+COM_CloseNXT(h);
+clear h % this is not necessary but good practice, so I recommend it
+
+%%
+% Instead of |BT_CloseAllHandles| we now have:
+
+COM_CloseNXT all
+
+%% 
+% The old way of closing just a specific serial port has been mapped to
+% this syntax:
+
+COM_CloseNXT('all', 'bluetooth.ini');
+
+
+
+%% New debug functions
+% The way the function |textOut| behaves has not changed. But it was quite
+% uncomfortable to use |global DisableScreenOut| in order to enable or
+% disable debug messages. So we now have helper functions:
+
+DebugMode on
+    % do something
+DebugMode off
+
+%%
+% |DebugMode(state)| is a method that can set the debug-state,
+% but when called without any arguments, |DebugMode()| will return
+% the current setting.
+% So if we want to remember and restore the previous state, we can
+% do so by:
+
+OldDebugState = DebugMode(); % remember old state
+DebugMode on  % force it to always be on
+    % do something with guaranteed debug infos
+DebugMode(OldDebugState); % be polite, reset to old state
+
+%% 
+% To check if debug messages are enabled, use:
+
+if isdebug
+    % we know debug mode is set to 'on'
+end%if
+
+%%
+% This is essentially the same as
+if strcmpi(DebugMode(), 'on')
+    % we know debug mode is set to 'on'
+end%if
+
+%%
+% but since MATLAB is not very fast with string comparisons, I recommend to
+% use |isdebug| where time is critical. Also it is easier. 
+
+%%
+% Please note the similarity to MATLAB's built-in functions |hold on|,
+% |hold off| and |ishold|.
+
+
+
+%% New "snapshot" mode for ultrasonic sensor
+% The function |OpenUltrasonic| has been updated with the additional
+% optional parameter |'snapshot'|. When set, the functions |USMakeSnapshot|
+% and |USGetSnapshotResults| enable you to send out a single "ping" signal,
+% and let the sensor record up to 8 following echos. All 8 recordings can
+% then be retrieved in one step. See function help for further information.
+% An example might look like this:
+
+port = SENSOR_4;
+OpenUltrasonic(port, 'snapshot');
+% send out the ping
+USMakeSnapshot(port);
+% wait some time for the sound to travel
+pause(0.1); % 100ms is probably too much, calculate using c_sound ;-)
+% retrieve all the echos in 1 step
+echos = USGetSnapshotResults(port);
+CloseSensor(port);
+
+
+%% New I/O Map Module access
+% New system functions |NXT_ReadIOMap| and |NXT_WriteIOMap| have been
+% implemented, enabling low-level access to the NXT's internal I/O map module
+% registers. For easier usage, some high level functions have been
+% implemented. They all start with the prefix |MAP_|, see list of functions
+% and their documentation for further information.
+
+%%
+% Note: These new functions do not (yet?) work under Windows when using USB
+% connections. They do however work with Bluetooth under Windows. On Linux
+% systems, both USB and Bluetooth connections are supported for I/O map
+% module access.
+
+
+
+
+
+%% Conclusion
+% To sum up all necessary changes for your programs:
+%
+
+%%
+% * Replace |BT_OpenHandle| with |COM_OpenNXT|, syntax stays the same. If
+%   you want, you can also use |COM_OpenNXTEx|, but then a more complex
+%   syntax comes into place.
+% * Replace |BT_SetDefaultHandle| with |COM_SetDefaultNXT| and
+%   |BT_GetDefaultHandle| with |COM_GetDefaultNXT|.
+% * Replace |BT_CloseHandle(h)| with |COM_CloseNXT(h)|.
+% * Replace |BT_CloseAllHandles()| with |COM_CloseNXT('all')|.
+% * Replace |BT_CloseAllHandles('bluetooth.ini')| with 
+%   |COM_CloseNXT('all', 'bluetooth.ini')|.
+% * Instead of modifying the global variable |DisableScreenOut| for
+%   debug-messages by |textOut|, the two new easy functions |DebugMode()|
+%   and |isdebug| are available.
+
+
+%% Contact
+%
+% Please feel free to contact me by mail if you have comments:
+%
+% linus (dot) atorf (at) rwth-aachen (dot) de
+%
+% or via <www.mindstorms.rwth-aachen.de>
+% 
+%
+% _Version 1.01 of this document, Linus Atorf, July 18th 2008_
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/abc.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/abc.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/abc.html	(revision 254)
@@ -11,129 +11,82 @@
 <h1>Functions - Alphabetical List</h1>
 </p>
-<hr>
-<p>
-<!-- <font size="4" face="Geneva, Arial, Helvetica, san-serif"> -->
-   A&nbsp;&nbsp;
-   <a href="#B">B</a>&nbsp;&nbsp;
-   <a href="#C">C</a>&nbsp;&nbsp;
-   <a href="#D">D</a>&nbsp;&nbsp;
-   E&nbsp;&nbsp;
-   F&nbsp;&nbsp;
-   <a href="#G">G</a>&nbsp;&nbsp;
-   H&nbsp;&nbsp;
-   I&nbsp;&nbsp;
-   J&nbsp;&nbsp;
-   K&nbsp;&nbsp;
-   L&nbsp;&nbsp;
-   <a href="#M">M</a>&nbsp;&nbsp;
-   <a href="#N">N</a>&nbsp;&nbsp;
-   <a href="#O">O</a>&nbsp;&nbsp;
-   P&nbsp;&nbsp;
-   Q&nbsp;&nbsp;
-   <a href="#R">R</a>&nbsp;&nbsp;
-   <a href="#S">S</a>&nbsp;&nbsp;
-   <a href="#T">T</a>&nbsp;&nbsp;
-   U&nbsp;&nbsp;
-   V&nbsp;&nbsp;
-   <a href="#W">W</a>&nbsp;&nbsp;
-   X&nbsp;&nbsp;
-   Y&nbsp;&nbsp;
-   Z&nbsp;&nbsp;
-</p>
-<br><br>
 
 <table>
-
-
-<tr><td><a name="B"></a>
-<a href="./help/BT_CloseAllHandles.html">BT_CloseAllHandles</a></td><td>Closes and deletes all existing serial or file handles, which are open </td></tr>
-<tr><td><a href="./help/BT_CloseHandle.html">BT_CloseHandle</a></td><td>Closes and deletes an existing serial or file handle </td></tr>
-<tr><td><a href="./help/BT_CollectPacket.html">BT_CollectPacket</a></td><td>Reads data from serial/Bluetooth port and retrieves exactly one packet </td></tr>
-<tr><td><a href="./help/BT_CreatePacket.html">BT_CreatePacket</a></td><td>Generates a valid Bluetooth packet ready for transmission (i.e. calculates length) </td></tr>
-<tr><td><a href="./help/BT_GetDefaultHandle.html">BT_GetDefaultHandle</a></td><td>Returns the global default Bluetooth handle if it was previously set </td></tr>
-<tr><td><a href="./help/BT_MakeConfigFile.html">BT_MakeConfigFile</a></td><td>Creates a Bluetooth configuration file which is needed to open a Bluetooth connection. </td></tr>
-<tr><td><a href="./help/BT_OpenHandle.html">BT_OpenHandle</a></td><td>Opens a Bluetooth connection using settings from the given configuration file </td></tr>
-<tr><td><a href="./help/BT_SendPacket.html">BT_SendPacket</a></td><td>Sends a Bluetooth packet (byte-array) via a Bluetooth channel (serial port) </td></tr>
-<tr><td><a href="./help/BT_SetDefaultHandle.html">BT_SetDefaultHandle</a></td><td>Sets a global default Bluetooth handle that will be used by the NXT-Functions if no other handle is specified. </td></tr>
-
-
-<tr><td><a name="C"></a>
-<a href="./help/CloseSensor.html">CloseSensor</a></td><td>Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor) </td></tr>
-<tr><td><a href="./help/checkStatusByte.html">checkStatusByte</a></td><td>Interpretes the status byte of a return package and creates an error message </td></tr>
-
-
-<tr><td><a name="G"></a>
-<a href="./help/GetLight.html">GetLight</a></td><td>Reads the current value of the NXT light sensor </td></tr>
-<tr><td><a href="./help/GetMemoryCount.html">GetMemoryCount</a></td><td>Gets the internal NXT memory counter (manual mapping replica) </td></tr>
-<tr><td><a href="./help/GetMotor.html">GetMotor</a></td><td>Reads the current motor set by SetMotor(). Raises an error if no motor was set </td></tr>
-<tr><td><a href="./help/GetMotorSettings.html">GetMotorSettings</a></td><td>Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor </td></tr>
-<tr><td><a href="./help/GetSound.html">GetSound</a></td><td>Reads the current value of the NXT sound sensor </td></tr>
-<tr><td><a href="./help/GetSwitch.html">GetSwitch</a></td><td>Reads the current value of the NXT switch / touch sensor </td></tr>
-<tr><td><a href="./help/GetUltrasonic.html">GetUltrasonic</a></td><td>Reads the current value of the NXT ultrasonic sensor </td></tr>
-
-
-<tr><td><a name="M"></a>
-<a href="./help/MOTOR_A.html">MOTOR_A</a></td><td>Symbolic constant MOTOR_A (returns 0) </td></tr>
-<tr><td><a href="./help/MOTOR_B.html">MOTOR_B</a></td><td>Symbolic constant MOTOR_B (returns 1) </td></tr>
-<tr><td><a href="./help/MOTOR_C.html">MOTOR_C</a></td><td>Symbolic constant MOTOR_C (returns 2) </td></tr>
-<tr><td><a href="./help/MotorRotateAbs.html">MotorRotateAbs</a></td><td>Rotates a motor to an absolute angle </td></tr>
-
-
-<tr><td><a name="N"></a>
-<a href="./help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></td><td>Returns the current battery level in milli volts </td></tr>
-<tr><td><a href="./help/NXT_GetInputValues.html">NXT_GetInputValues</a></td><td>Processes a complete sensor reading, i.e. requests input values and collects the answer. </td></tr>
-<tr><td><a href="./help/NXT_GetOutputState.html">NXT_GetOutputState</a></td><td>Requests and retrieves an output motor state reading </td></tr>
-<tr><td><a href="./help/NXT_LSGetStatus.html">NXT_LSGetStatus</a></td><td>Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic) </td></tr>
-<tr><td><a href="./help/NXT_LSRead.html">NXT_LSRead</a></td><td>Reads data from a low speed (digital) sensor </td></tr>
-<tr><td><a href="./help/NXT_LSWrite.html">NXT_LSWrite</a></td><td>Writes the given data to a low speed (digital) sensor </td></tr>
-<tr><td><a href="./help/NXT_PlayTone.html">NXT_PlayTone</a></td><td>Plays a tone with the given frequency and duration </td></tr>
-<tr><td><a href="./help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</a></td><td>Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode) </td></tr>
-<tr><td><a href="./help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a></td><td>Resets NXT internal counter for specified motor, relative or absolute counter </td></tr>
-<tr><td><a href="./help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></td><td>Sends a KeepAlive packet. Optional: requests sleep time limit. </td></tr>
-<tr><td><a href="./help/NXT_SetBrickName.html">NXT_SetBrickName</a></td><td>Sets a new name for the NXT Brick (connected to the specified handle) </td></tr>
-<tr><td><a href="./help/NXT_SetInputMode.html">NXT_SetInputMode</a></td><td>Sets mode, configures and initializes sensor ready to be read out </td></tr>
-<tr><td><a href="./help/NXT_SetOutputState.html">NXT_SetOutputState</a></td><td>Sends previously specified settings to current active motor. </td></tr>
-<tr><td><a href="./help/NXT_StartProgram.html">NXT_StartProgram</a></td><td>Starts the given program on the NXT Brick </td></tr>
-<tr><td><a href="./help/NXT_StopProgram.html">NXT_StopProgram</a></td><td>Stops a specific program on the NXT Brick </td></tr>
-
-
-<tr><td><a name="O"></a>
-<a href="./help/OpenLight.html">OpenLight</a></td><td>Sets the parameter mode of the NXT light sensor </td></tr>
-<tr><td><a href="./help/OpenSound.html">OpenSound</a></td><td>Sets the parameter mode of the NXT sound sensor </td></tr>
-<tr><td><a href="./help/OpenSwitch.html">OpenSwitch</a></td><td>Sets the parameter mode of the NXT switch / touch sensor </td></tr>
-<tr><td><a href="./help/OpenUltrasonic.html">OpenUltrasonic</a></td><td>Initializes and sets the mode of the NXT ultrasonic sensor </td></tr>
-
-
-<tr><td><a name="R"></a>
-<a href="./help/readFromIniFile.html">readFromIniFile</a></td><td>Reads parameters from a configuration file (usually *.ini) </td></tr>
-<tr><td><a href="./help/ResetMotorAngle.html">ResetMotorAngle</a></td><td>Resets the relative angle counter for the given motor </td></tr>
-
-
-<tr><td><a name="S"></a>
-<a href="./help/SENSOR_1.html">SENSOR_1</a></td><td>Symbolic constant SENSOR_1 (returns 0) </td></tr>
-<tr><td><a href="./help/SENSOR_2.html">SENSOR_2</a></td><td>Symbolic constant SENSOR_2 (returns 1) </td></tr>
-<tr><td><a href="./help/SENSOR_3.html">SENSOR_3</a></td><td>Symbolic constant SENSOR_3 (returns 2) </td></tr>
-<tr><td><a href="./help/SENSOR_4.html">SENSOR_4</a></td><td>Symbolic constant SENSOR_4 (returns 3) </td></tr>
-<tr><td><a href="./help/SendMotorSettings.html">SendMotorSettings</a></td><td>Sends previously specified settings to current active motor. </td></tr>
-<tr><td><a href="./help/SetAngleLimit.html">SetAngleLimit</a></td><td>Sets the angle limit (in degrees) of the current motor port </td></tr>
-<tr><td><a href="./help/SetMemoryCount.html">SetMemoryCount</a></td><td>Sets the internal NXT memory counter (manual mapping replica) </td></tr>
-<tr><td><a href="./help/SetMotor.html">SetMotor</a></td><td>Sets the current motor to use for motor setting commands </td></tr>
-<tr><td><a href="./help/SetPower.html">SetPower</a></td><td>Sets the power of the current active motor </td></tr>
-<tr><td><a href="./help/SetRampMode.html">SetRampMode</a></td><td>Sets the runstate of the current active motor </td></tr>
-<tr><td><a href="./help/SetTurnRatio.html">SetTurnRatio</a></td><td>Sets the turn ratio of the current active motor </td></tr>
-<tr><td><a href="./help/SpeedRegulation.html">SpeedRegulation</a></td><td>Enables / disables the speed regulation mode of the current active motor </td></tr>
-<tr><td><a href="./help/StopMotor.html">StopMotor</a></td><td>Stops / brakes specified motor. (Synchronisation will be lost after this) </td></tr>
-<tr><td><a href="./help/SwitchLamp.html">SwitchLamp</a></td><td>Switches the LEGO lamp on or off (has to be connected to a motor port) </td></tr>
-<tr><td><a href="./help/SyncToMotor.html">SyncToMotor</a></td><td>Enables synchronization regulation for current active and specified motor </td></tr>
-
-
-<tr><td><a name="T"></a>
-<a href="./help/textOut.html">textOut</a></td><td>Wrapper for fprintf() which can optionally write screen output to a logfile </td></tr>
-<tr><td><a href="./help/tictic.html">tictic</a></td><td>Similar to MATLAB's tic(), but extended to save "more states" </td></tr>
-<tr><td><a href="./help/toctoc.html">toctoc</a></td><td>Similar to MATLAB's toc(), but extended to save "more states" </td></tr>
-
-
-<tr><td><a name="W"></a>
-<a href="./help/WaitForMotor.html">WaitForMotor</a></td><td>Pauses execution until specific motor is not running anymore. </td></tr>
+<tr><td><a href="./help/checkStatusByte.html">checkStatusByte</a></td><td>Interpretes the status byte of a return package and creates an error message</td></tr>
+<tr><td><a href="./help/CloseSensor.html">CloseSensor</a></td><td>Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor)</td></tr>
+<tr><td><a href="./help/COM_CloseNXT.html">COM_CloseNXT</a></td><td>Closes and deletes a specific NXT handle, or clears all existing handles</td></tr>
+<tr><td><a href="./help/COM_CollectPacket.html">COM_CollectPacket</a></td><td>Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet</td></tr>
+<tr><td><a href="./help/COM_CreatePacket.html">COM_CreatePacket</a></td><td>Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)</td></tr>
+<tr><td><a href="./help/COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></td><td>Returns the global default NXT handle if it was previously set</td></tr>
+<tr><td><a href="./help/COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a></td><td>Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.</td></tr>
+<tr><td><a href="./help/COM_OpenNXT.html">COM_OpenNXT</a></td><td>Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use</td></tr>
+<tr><td><a href="./help/COM_OpenNXTEx.html">COM_OpenNXTEx</a></td><td>Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use</td></tr>
+<tr><td><a href="./help/COM_SendPacket.html">COM_SendPacket</a></td><td>Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)</td></tr>
+<tr><td><a href="./help/COM_SetDefaultNXT.html">COM_SetDefaultNXT</a></td><td>Sets a global default NXT handle that will be used by other functions if no handle is specified.</td></tr>
+<tr><td><a href="./help/DebugMode.html">DebugMode</a></td><td>Gets or sets the debug state (i.e. if textOut will print messages to the command window)</td></tr>
+<tr><td><a href="./help/GetLight.html">GetLight</a></td><td>Reads the current value of the NXT light sensor</td></tr>
+<tr><td><a href="./help/GetMemoryCount.html">GetMemoryCount</a></td><td>Gets the internal NXT memory counter (manual mapping replica)</td></tr>
+<tr><td><a href="./help/GetMotor.html">GetMotor</a></td><td>Reads the current motor set by SetMotor(). Raises an error if no motor was set</td></tr>
+<tr><td><a href="./help/GetMotorSettings.html">GetMotorSettings</a></td><td>Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor</td></tr>
+<tr><td><a href="./help/GetSound.html">GetSound</a></td><td>Reads the current value of the NXT sound sensor</td></tr>
+<tr><td><a href="./help/GetSwitch.html">GetSwitch</a></td><td>Reads the current value of the NXT switch / touch sensor</td></tr>
+<tr><td><a href="./help/GetUltrasonic.html">GetUltrasonic</a></td><td>Reads the current value of the NXT ultrasonic sensor</td></tr>
+<tr><td><a href="./help/MAP_GetCommModule.html">MAP_GetCommModule</a></td><td>Reads the IO map of the communication module</td></tr>
+<tr><td><a href="./help/MAP_GetInputModule.html">MAP_GetInputModule</a></td><td>Reads the IO map of the input module</td></tr>
+<tr><td><a href="./help/MAP_GetOutputModule.html">MAP_GetOutputModule</a></td><td>Reads the IO map of the output module</td></tr>
+<tr><td><a href="./help/MAP_GetSoundModule.html">MAP_GetSoundModule</a></td><td>Reads the IO map of the sound module</td></tr>
+<tr><td><a href="./help/MAP_GetUIModule.html">MAP_GetUIModule</a></td><td>Reads the IO map of the user interface module</td></tr>
+<tr><td><a href="./help/MAP_SetOutputModule.html">MAP_SetOutputModule</a></td><td>Writes the IO map to the output module</td></tr>
+<tr><td><a href="./help/MOTOR_A.html">MOTOR_A</a></td><td>Symbolic constant MOTOR_A (returns 0)</td></tr>
+<tr><td><a href="./help/MOTOR_B.html">MOTOR_B</a></td><td>Symbolic constant MOTOR_B (returns 1)</td></tr>
+<tr><td><a href="./help/MOTOR_C.html">MOTOR_C</a></td><td>Symbolic constant MOTOR_C (returns 2)</td></tr>
+<tr><td><a href="./help/MotorRotateAbs.html">MotorRotateAbs</a></td><td>Rotates a motor to an absolute angle</td></tr>
+<tr><td><a href="./help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></td><td>Returns the current battery level in milli volts</td></tr>
+<tr><td><a href="./help/NXT_GetFirmwareVersion.html">NXT_GetFirmwareVersion</a></td><td>Returns the protocol and firmware version of the NXT</td></tr>
+<tr><td><a href="./help/NXT_GetInputValues.html">NXT_GetInputValues</a></td><td>Processes a complete sensor reading, i.e. requests input values and collects the answer.</td></tr>
+<tr><td><a href="./help/NXT_GetOutputState.html">NXT_GetOutputState</a></td><td>Requests and retrieves an output motor state reading</td></tr>
+<tr><td><a href="./help/NXT_LSGetStatus.html">NXT_LSGetStatus</a></td><td>Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic)</td></tr>
+<tr><td><a href="./help/NXT_LSRead.html">NXT_LSRead</a></td><td>Reads data from a low speed (digital) sensor</td></tr>
+<tr><td><a href="./help/NXT_LSWrite.html">NXT_LSWrite</a></td><td>Writes the given data to a low speed (digital) sensor</td></tr>
+<tr><td><a href="./help/NXT_PlaySoundFile.html">NXT_PlaySoundFile</a></td><td>Plays the given sound file on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_PlayTone.html">NXT_PlayTone</a></td><td>Plays a tone with the given frequency and duration</td></tr>
+<tr><td><a href="./help/NXT_ReadIOMap.html">NXT_ReadIOMap</a></td><td>Reads the IO map of the given module ID</td></tr>
+<tr><td><a href="./help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</a></td><td>Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode)</td></tr>
+<tr><td><a href="./help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a></td><td>Resets NXT internal counter for specified motor, relative or absolute counter</td></tr>
+<tr><td><a href="./help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></td><td>Sends a KeepAlive packet. Optional: requests sleep time limit.</td></tr>
+<tr><td><a href="./help/NXT_SetBrickName.html">NXT_SetBrickName</a></td><td>Sets a new name for the NXT Brick (connected to the specified handle)</td></tr>
+<tr><td><a href="./help/NXT_SetInputMode.html">NXT_SetInputMode</a></td><td>Sets mode, configures and initializes sensor ready to be read out</td></tr>
+<tr><td><a href="./help/NXT_SetOutputState.html">NXT_SetOutputState</a></td><td>Sends previously specified settings to current active motor.</td></tr>
+<tr><td><a href="./help/NXT_StartProgram.html">NXT_StartProgram</a></td><td>Starts the given program on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_StopProgram.html">NXT_StopProgram</a></td><td>Stops a specific program on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_StopSoundPlayback.html">NXT_StopSoundPlayback</a></td><td>Stops the current sound playback</td></tr>
+<tr><td><a href="./help/NXT_WriteIOMap.html">NXT_WriteIOMap</a></td><td>Writes the IO map to the given module ID</td></tr>
+<tr><td><a href="./help/OpenLight.html">OpenLight</a></td><td>Sets the parameter mode of the NXT light sensor</td></tr>
+<tr><td><a href="./help/OpenSound.html">OpenSound</a></td><td>Sets the parameter mode of the NXT sound sensor</td></tr>
+<tr><td><a href="./help/OpenSwitch.html">OpenSwitch</a></td><td>Sets the parameter mode of the NXT switch / touch sensor</td></tr>
+<tr><td><a href="./help/OpenUltrasonic.html">OpenUltrasonic</a></td><td>Initializes and sets the mode of the NXT ultrasonic sensor</td></tr>
+<tr><td><a href="./help/readFromIniFile.html">readFromIniFile</a></td><td>Reads parameters from a configuration file (usually *.ini)</td></tr>
+<tr><td><a href="./help/ResetMotorAngle.html">ResetMotorAngle</a></td><td>Resets the relative angle counter for the given motor</td></tr>
+<tr><td><a href="./help/SendMotorSettings.html">SendMotorSettings</a></td><td>Sends previously specified settings to current active motor.</td></tr>
+<tr><td><a href="./help/SENSOR_1.html">SENSOR_1</a></td><td>Symbolic constant SENSOR_1 (returns 0)</td></tr>
+<tr><td><a href="./help/SENSOR_2.html">SENSOR_2</a></td><td>Symbolic constant SENSOR_2 (returns 1)</td></tr>
+<tr><td><a href="./help/SENSOR_3.html">SENSOR_3</a></td><td>Symbolic constant SENSOR_3 (returns 2)</td></tr>
+<tr><td><a href="./help/SENSOR_4.html">SENSOR_4</a></td><td>Symbolic constant SENSOR_4 (returns 3)</td></tr>
+<tr><td><a href="./help/SetAngleLimit.html">SetAngleLimit</a></td><td>Sets the angle limit (in degrees) of the current motor port</td></tr>
+<tr><td><a href="./help/SetMemoryCount.html">SetMemoryCount</a></td><td>Sets the internal NXT memory counter (manual mapping replica)</td></tr>
+<tr><td><a href="./help/SetMotor.html">SetMotor</a></td><td>Sets the current motor to use for motor setting commands</td></tr>
+<tr><td><a href="./help/SetPower.html">SetPower</a></td><td>Sets the power of the current active motor</td></tr>
+<tr><td><a href="./help/SetRampMode.html">SetRampMode</a></td><td>Sets the runstate of the current active motor</td></tr>
+<tr><td><a href="./help/SetTurnRatio.html">SetTurnRatio</a></td><td>Sets the turn ratio of the current active motor</td></tr>
+<tr><td><a href="./help/SpeedRegulation.html">SpeedRegulation</a></td><td>Enables / disables the speed regulation mode of the current active motor</td></tr>
+<tr><td><a href="./help/StopMotor.html">StopMotor</a></td><td>Stops / brakes specified motor. (Synchronisation will be lost after this)</td></tr>
+<tr><td><a href="./help/SwitchLamp.html">SwitchLamp</a></td><td>Switches the LEGO lamp on or off (has to be connected to a motor port)</td></tr>
+<tr><td><a href="./help/SyncToMotor.html">SyncToMotor</a></td><td>Enables synchronization regulation for current active and specified motor</td></tr>
+<tr><td><a href="./help/textOut.html">textOut</a></td><td>Wrapper for fprintf() which can optionally write screen output to a logfile</td></tr>
+<tr><td><a href="./help/tictic.html">tictic</a></td><td>Similar to MATLAB's tic(), but extended to save "more states"</td></tr>
+<tr><td><a href="./help/toctoc.html">toctoc</a></td><td>Similar to MATLAB's toc(), but extended to save "more states"</td></tr>
+<tr><td><a href="./help/USGetSnapshotResults.html">USGetSnapshotResults</a></td><td>Retrieves up to eight echos (distances) stored inside the US sensor</td></tr>
+<tr><td><a href="./help/USMakeSnapshot.html">USMakeSnapshot</a></td><td>Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos</td></tr>
+<tr><td><a href="./help/WaitForMotor.html">WaitForMotor</a></td><td>Pauses execution until specific motor is not running anymore.</td></tr>
 </table>
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/categories.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/categories.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/categories.html	(revision 254)
@@ -1,5 +1,5 @@
 <html>
 <head>
-<title>Functions - By Category</title>
+<title>Functions by Category</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <link type="text/css" rel="stylesheet" href="../style.css">
@@ -9,101 +9,113 @@
 <p class="header">RWTH - Mindstorms NXT Toolbox</p>
 <p align="center">
-<h1>Functions - By Category</h1>
-</p>
-<hr>
-<p>
-<!-- <font size="4" face="Geneva, Arial, Helvetica, san-serif"> -->
+<h1>Functions by Category</h1>
 </p>
 
 <table>
-
-<tr><td colspan="2"><h2>Bluetooth Connection</h2></td></tr>
-<tr><td><a href="./help/BT_MakeConfigFile.html">BT_MakeConfigFile</a></td><td>Creates a Bluetooth configuration file which is needed to open a Bluetooth connection. </td></tr>
-<tr><td><a href="./help/BT_CloseAllHandles.html">BT_CloseAllHandles</a></td><td>Closes and deletes all existing serial or file handles, which are open </td></tr>
-<tr><td><a href="./help/BT_CloseHandle.html">BT_CloseHandle</a></td><td>Closes and deletes an existing serial or file handle </td></tr>
-<tr><td><a href="./help/BT_OpenHandle.html">BT_OpenHandle</a></td><td>Opens a Bluetooth connection using settings from the given configuration file </td></tr>
-<tr><td><a href="./help/BT_SetDefaultHandle.html">BT_SetDefaultHandle</a></td><td>Sets a global default Bluetooth handle that will be used by the NXT-Functions if no other handle is specified. </td></tr>
-<tr><td><a href="./help/BT_GetDefaultHandle.html">BT_GetDefaultHandle</a></td><td>Returns the global default Bluetooth handle if it was previously set </td></tr>
-<tr><td><a href="./help/BT_CreatePacket.html">BT_CreatePacket</a></td><td>Generates a valid Bluetooth packet ready for transmission (i.e. calculates length) </td></tr>
-<tr><td><a href="./help/BT_SendPacket.html">BT_SendPacket</a></td><td>Sends a Bluetooth packet (byte-array) via a Bluetooth channel (serial port) </td></tr>
-<tr><td><a href="./help/BT_CollectPacket.html">BT_CollectPacket</a></td><td>Reads data from serial/Bluetooth port and retrieves exactly one packet </td></tr>
+<tr><td colspan="2"><h2>NXT Communication</h2></td></tr>
+<tr><td><a href="./help/COM_CloseNXT.html">COM_CloseNXT</a></td><td>Closes and deletes a specific NXT handle, or clears all existing handles</td></tr>
+<tr><td><a href="./help/COM_CollectPacket.html">COM_CollectPacket</a></td><td>Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet</td></tr>
+<tr><td><a href="./help/COM_CreatePacket.html">COM_CreatePacket</a></td><td>Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)</td></tr>
+<tr><td><a href="./help/COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></td><td>Returns the global default NXT handle if it was previously set</td></tr>
+<tr><td><a href="./help/COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a></td><td>Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.</td></tr>
+<tr><td><a href="./help/COM_OpenNXT.html">COM_OpenNXT</a></td><td>Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use</td></tr>
+<tr><td><a href="./help/COM_OpenNXTEx.html">COM_OpenNXTEx</a></td><td>Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use</td></tr>
+<tr><td><a href="./help/COM_SendPacket.html">COM_SendPacket</a></td><td>Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)</td></tr>
+<tr><td><a href="./help/COM_SetDefaultNXT.html">COM_SetDefaultNXT</a></td><td>Sets a global default NXT handle that will be used by other functions if no handle is specified.</td></tr>
 <tr><td><br><br></td></tr>
 
 
 <tr><td colspan="2"><h2>NXT Sensors</h2></td></tr>
-<tr><td><a href="./help/OpenLight.html">OpenLight</a></td><td>Sets the parameter mode of the NXT light sensor </td></tr>
-<tr><td><a href="./help/OpenSound.html">OpenSound</a></td><td>Sets the parameter mode of the NXT sound sensor </td></tr>
-<tr><td><a href="./help/OpenSwitch.html">OpenSwitch</a></td><td>Sets the parameter mode of the NXT switch / touch sensor </td></tr>
-<tr><td><a href="./help/OpenUltrasonic.html">OpenUltrasonic</a></td><td>Initializes and sets the mode of the NXT ultrasonic sensor </td></tr>
-<tr><td><a href="./help/CloseSensor.html">CloseSensor</a></td><td>Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor) </td></tr>
-<tr><td><a href="./help/GetLight.html">GetLight</a></td><td>Reads the current value of the NXT light sensor </td></tr>
-<tr><td><a href="./help/GetSound.html">GetSound</a></td><td>Reads the current value of the NXT sound sensor </td></tr>
-<tr><td><a href="./help/GetSwitch.html">GetSwitch</a></td><td>Reads the current value of the NXT switch / touch sensor </td></tr>
-<tr><td><a href="./help/GetUltrasonic.html">GetUltrasonic</a></td><td>Reads the current value of the NXT ultrasonic sensor </td></tr>
-<tr><td><br></td></tr>
-<tr><td><a href="./help/SENSOR_1.html">SENSOR_1</a></td><td>Symbolic constant SENSOR_1 (returns 0) </td></tr>
-<tr><td><a href="./help/SENSOR_2.html">SENSOR_2</a></td><td>Symbolic constant SENSOR_2 (returns 1) </td></tr>
-<tr><td><a href="./help/SENSOR_3.html">SENSOR_3</a></td><td>Symbolic constant SENSOR_3 (returns 2) </td></tr>
-<tr><td><a href="./help/SENSOR_4.html">SENSOR_4</a></td><td>Symbolic constant SENSOR_4 (returns 3) </td></tr>
+<tr><td><a href="./help/CloseSensor.html">CloseSensor</a></td><td>Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor)</td></tr>
+<tr><td><a href="./help/GetLight.html">GetLight</a></td><td>Reads the current value of the NXT light sensor</td></tr>
+<tr><td><a href="./help/GetSound.html">GetSound</a></td><td>Reads the current value of the NXT sound sensor</td></tr>
+<tr><td><a href="./help/GetSwitch.html">GetSwitch</a></td><td>Reads the current value of the NXT switch / touch sensor</td></tr>
+<tr><td><a href="./help/GetUltrasonic.html">GetUltrasonic</a></td><td>Reads the current value of the NXT ultrasonic sensor</td></tr>
+<tr><td><a href="./help/OpenLight.html">OpenLight</a></td><td>Sets the parameter mode of the NXT light sensor</td></tr>
+<tr><td><a href="./help/OpenSound.html">OpenSound</a></td><td>Sets the parameter mode of the NXT sound sensor</td></tr>
+<tr><td><a href="./help/OpenSwitch.html">OpenSwitch</a></td><td>Sets the parameter mode of the NXT switch / touch sensor</td></tr>
+<tr><td><a href="./help/OpenUltrasonic.html">OpenUltrasonic</a></td><td>Initializes and sets the mode of the NXT ultrasonic sensor</td></tr>
+<tr><td><a href="./help/SENSOR_1.html">SENSOR_1</a></td><td>Symbolic constant SENSOR_1 (returns 0)</td></tr>
+<tr><td><a href="./help/SENSOR_2.html">SENSOR_2</a></td><td>Symbolic constant SENSOR_2 (returns 1)</td></tr>
+<tr><td><a href="./help/SENSOR_3.html">SENSOR_3</a></td><td>Symbolic constant SENSOR_3 (returns 2)</td></tr>
+<tr><td><a href="./help/SENSOR_4.html">SENSOR_4</a></td><td>Symbolic constant SENSOR_4 (returns 3)</td></tr>
+<tr><td><a href="./help/USGetSnapshotResults.html">USGetSnapshotResults</a></td><td>Retrieves up to eight echos (distances) stored inside the US sensor</td></tr>
+<tr><td><a href="./help/USMakeSnapshot.html">USMakeSnapshot</a></td><td>Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos</td></tr>
 <tr><td><br><br></td></tr>
 
 
-<tr><td colspan="2"><h2>NXT Motor</h2></td></tr>
-<tr><td><a href="./help/GetMotor.html">GetMotor</a></td><td>Reads the current motor set by SetMotor(). Raises an error if no motor was set </td></tr>
-<tr><td><a href="./help/GetMotorSettings.html">GetMotorSettings</a></td><td>Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor </td></tr>
-<tr><td><a href="./help/SetAngleLimit.html">SetAngleLimit</a></td><td>Sets the angle limit (in degrees) of the current motor port </td></tr>
-<tr><td><a href="./help/SetMotor.html">SetMotor</a></td><td>Sets the current motor to use for motor setting commands </td></tr>
-<tr><td><a href="./help/SetPower.html">SetPower</a></td><td>Sets the power of the current active motor </td></tr>
-<tr><td><a href="./help/SetRampMode.html">SetRampMode</a></td><td>Sets the runstate of the current active motor </td></tr>
-<tr><td><a href="./help/SetTurnRatio.html">SetTurnRatio</a></td><td>Sets the turn ratio of the current active motor </td></tr>
-<tr><td><a href="./help/SpeedRegulation.html">SpeedRegulation</a></td><td>Enables / disables the speed regulation mode of the current active motor </td></tr>
-<tr><td><a href="./help/SyncToMotor.html">SyncToMotor</a></td><td>Enables synchronization regulation for current active and specified motor </td></tr>
-<tr><td><a href="./help/SendMotorSettings.html">SendMotorSettings</a></td><td>Sends previously specified settings to current active motor. </td></tr>
-<tr><td><a href="./help/WaitForMotor.html">WaitForMotor</a></td><td>Pauses execution until specific motor is not running anymore. </td></tr>
-<tr><td><a href="./help/StopMotor.html">StopMotor</a></td><td>Stops / brakes specified motor. (Synchronisation will be lost after this) </td></tr>
-<tr><td><a href="./help/ResetMotorAngle.html">ResetMotorAngle</a></td><td>Resets the relative angle counter for the given motor </td></tr>
-<tr><td><br></td></tr>
-<tr><td><a href="./help/SwitchLamp.html">SwitchLamp</a></td><td>Switches the LEGO lamp on or off (has to be connected to a motor port) </td></tr>
-<tr><td><br></td></tr>
-<tr><td><a href="./help/MOTOR_A.html">MOTOR_A</a></td><td>Symbolic constant MOTOR_A (returns 0) </td></tr>
-<tr><td><a href="./help/MOTOR_B.html">MOTOR_B</a></td><td>Symbolic constant MOTOR_B (returns 1) </td></tr>
-<tr><td><a href="./help/MOTOR_C.html">MOTOR_C</a></td><td>Symbolic constant MOTOR_C (returns 2) </td></tr>
-<tr><td><br></td></tr>
-<tr><td><a href="./help/MotorRotateAbs.html">MotorRotateAbs</a></td><td>Rotates a motor to an absolute angle </td></tr>
-<tr><td><a href="./help/GetMemoryCount.html">GetMemoryCount</a></td><td>Gets the internal NXT memory counter (manual mapping replica) </td></tr>
-<tr><td><a href="./help/SetMemoryCount.html">SetMemoryCount</a></td><td>Sets the internal NXT memory counter (manual mapping replica) </td></tr>
+<tr><td colspan="2"><h2>NXT Motors</h2></td></tr>
+<tr><td><a href="./help/GetMemoryCount.html">GetMemoryCount</a></td><td>Gets the internal NXT memory counter (manual mapping replica)</td></tr>
+<tr><td><a href="./help/GetMotor.html">GetMotor</a></td><td>Reads the current motor set by SetMotor(). Raises an error if no motor was set</td></tr>
+<tr><td><a href="./help/GetMotorSettings.html">GetMotorSettings</a></td><td>Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor</td></tr>
+<tr><td><a href="./help/MOTOR_A.html">MOTOR_A</a></td><td>Symbolic constant MOTOR_A (returns 0)</td></tr>
+<tr><td><a href="./help/MOTOR_B.html">MOTOR_B</a></td><td>Symbolic constant MOTOR_B (returns 1)</td></tr>
+<tr><td><a href="./help/MOTOR_C.html">MOTOR_C</a></td><td>Symbolic constant MOTOR_C (returns 2)</td></tr>
+<tr><td><a href="./help/MotorRotateAbs.html">MotorRotateAbs</a></td><td>Rotates a motor to an absolute angle</td></tr>
+<tr><td><a href="./help/ResetMotorAngle.html">ResetMotorAngle</a></td><td>Resets the relative angle counter for the given motor</td></tr>
+<tr><td><a href="./help/SendMotorSettings.html">SendMotorSettings</a></td><td>Sends previously specified settings to current active motor.</td></tr>
+<tr><td><a href="./help/SetAngleLimit.html">SetAngleLimit</a></td><td>Sets the angle limit (in degrees) of the current motor port</td></tr>
+<tr><td><a href="./help/SetMemoryCount.html">SetMemoryCount</a></td><td>Sets the internal NXT memory counter (manual mapping replica)</td></tr>
+<tr><td><a href="./help/SetMotor.html">SetMotor</a></td><td>Sets the current motor to use for motor setting commands</td></tr>
+<tr><td><a href="./help/SetPower.html">SetPower</a></td><td>Sets the power of the current active motor</td></tr>
+<tr><td><a href="./help/SetRampMode.html">SetRampMode</a></td><td>Sets the runstate of the current active motor</td></tr>
+<tr><td><a href="./help/SetTurnRatio.html">SetTurnRatio</a></td><td>Sets the turn ratio of the current active motor</td></tr>
+<tr><td><a href="./help/SpeedRegulation.html">SpeedRegulation</a></td><td>Enables / disables the speed regulation mode of the current active motor</td></tr>
+<tr><td><a href="./help/StopMotor.html">StopMotor</a></td><td>Stops / brakes specified motor. (Synchronisation will be lost after this)</td></tr>
+<tr><td><a href="./help/SwitchLamp.html">SwitchLamp</a></td><td>Switches the LEGO lamp on or off (has to be connected to a motor port)</td></tr>
+<tr><td><a href="./help/SyncToMotor.html">SyncToMotor</a></td><td>Enables synchronization regulation for current active and specified motor</td></tr>
+<tr><td><a href="./help/WaitForMotor.html">WaitForMotor</a></td><td>Pauses execution until specific motor is not running anymore.</td></tr>
 <tr><td><br><br></td></tr>
 
 
-<tr><td colspan="2"><h2> Direct NXT Functions</h2></td></tr>
-<tr><td><a href="./help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></td><td>Returns the current battery level in milli volts </td></tr>
-<tr><td><a href="./help/NXT_GetInputValues.html">NXT_GetInputValues</a></td><td>Processes a complete sensor reading, i.e. requests input values and collects the answer. </td></tr>
-<tr><td><a href="./help/NXT_GetOutputState.html">NXT_GetOutputState</a></td><td>Requests and retrieves an output motor state reading </td></tr>
-<tr><td><a href="./help/NXT_LSGetStatus.html">NXT_LSGetStatus</a></td><td>Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic) </td></tr>
-<tr><td><a href="./help/NXT_LSRead.html">NXT_LSRead</a></td><td>Reads data from a low speed (digital) sensor </td></tr>
-<tr><td><a href="./help/NXT_LSWrite.html">NXT_LSWrite</a></td><td>Writes the given data to a low speed (digital) sensor </td></tr>
-<tr><td><a href="./help/NXT_PlayTone.html">NXT_PlayTone</a></td><td>Plays a tone with the given frequency and duration </td></tr>
-<tr><td><a href="./help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</a></td><td>Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode) </td></tr>
-<tr><td><a href="./help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a></td><td>Resets NXT internal counter for specified motor, relative or absolute counter </td></tr>
-<tr><td><a href="./help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></td><td>Sends a KeepAlive packet. Optional: requests sleep time limit. </td></tr>
-<tr><td><a href="./help/NXT_SetBrickName.html">NXT_SetBrickName</a></td><td>Sets a new name for the NXT Brick (connected to the specified handle) </td></tr>
-<tr><td><a href="./help/NXT_SetInputMode.html">NXT_SetInputMode</a></td><td>Sets mode, configures and initializes sensor ready to be read out </td></tr>
-<tr><td><a href="./help/NXT_SetOutputState.html">NXT_SetOutputState</a></td><td>Sends previously specified settings to current active motor. </td></tr>
-<tr><td><a href="./help/NXT_StartProgram.html">NXT_StartProgram</a></td><td>Starts the given program on the NXT Brick </td></tr>
-<tr><td><a href="./help/NXT_StopProgram.html">NXT_StopProgram</a></td><td>Stops a specific program on the NXT Brick </td></tr>
+<tr><td colspan="2"><h2>Direct NXT Functions</h2></td></tr>
+<tr><td><a href="./help/NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></td><td>Returns the current battery level in milli volts</td></tr>
+<tr><td><a href="./help/NXT_GetFirmwareVersion.html">NXT_GetFirmwareVersion</a></td><td>Returns the protocol and firmware version of the NXT</td></tr>
+<tr><td><a href="./help/NXT_GetInputValues.html">NXT_GetInputValues</a></td><td>Processes a complete sensor reading, i.e. requests input values and collects the answer.</td></tr>
+<tr><td><a href="./help/NXT_GetOutputState.html">NXT_GetOutputState</a></td><td>Requests and retrieves an output motor state reading</td></tr>
+<tr><td><a href="./help/NXT_LSGetStatus.html">NXT_LSGetStatus</a></td><td>Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic)</td></tr>
+<tr><td><a href="./help/NXT_LSRead.html">NXT_LSRead</a></td><td>Reads data from a low speed (digital) sensor</td></tr>
+<tr><td><a href="./help/NXT_LSWrite.html">NXT_LSWrite</a></td><td>Writes the given data to a low speed (digital) sensor</td></tr>
+<tr><td><a href="./help/NXT_PlaySoundFile.html">NXT_PlaySoundFile</a></td><td>Plays the given sound file on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_PlayTone.html">NXT_PlayTone</a></td><td>Plays a tone with the given frequency and duration</td></tr>
+<tr><td><a href="./help/NXT_ReadIOMap.html">NXT_ReadIOMap</a></td><td>Reads the IO map of the given module ID</td></tr>
+<tr><td><a href="./help/NXT_ResetInputScaledValue.html">NXT_ResetInputScaledValue</a></td><td>Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode)</td></tr>
+<tr><td><a href="./help/NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a></td><td>Resets NXT internal counter for specified motor, relative or absolute counter</td></tr>
+<tr><td><a href="./help/NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></td><td>Sends a KeepAlive packet. Optional: requests sleep time limit.</td></tr>
+<tr><td><a href="./help/NXT_SetBrickName.html">NXT_SetBrickName</a></td><td>Sets a new name for the NXT Brick (connected to the specified handle)</td></tr>
+<tr><td><a href="./help/NXT_SetInputMode.html">NXT_SetInputMode</a></td><td>Sets mode, configures and initializes sensor ready to be read out</td></tr>
+<tr><td><a href="./help/NXT_SetOutputState.html">NXT_SetOutputState</a></td><td>Sends previously specified settings to current active motor.</td></tr>
+<tr><td><a href="./help/NXT_StartProgram.html">NXT_StartProgram</a></td><td>Starts the given program on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_StopProgram.html">NXT_StopProgram</a></td><td>Stops a specific program on the NXT Brick</td></tr>
+<tr><td><a href="./help/NXT_StopSoundPlayback.html">NXT_StopSoundPlayback</a></td><td>Stops the current sound playback</td></tr>
+<tr><td><a href="./help/NXT_WriteIOMap.html">NXT_WriteIOMap</a></td><td>Writes the IO map to the given module ID</td></tr>
 <tr><td><br><br></td></tr>
 
 
-<tr><td colspan="2"><h2> Help Functions</h2></td></tr>
-<tr><td><a href="./help/checkStatusByte.html">checkStatusByte</a></td><td>Interpretes the status byte of a return package and creates an error message </td></tr>
-<tr><td><a href="./help/readFromIniFile.html">readFromIniFile</a></td><td>Reads parameters from a configuration file (usually *.ini) </td></tr>
-<tr><td><a href="./help/textOut.html">textOut</a></td><td>Wrapper for fprintf() which can optionally write screen output to a logfile </td></tr>
-<tr><td><a href="./help/tictic.html">tictic</a></td><td>Similar to MATLAB's tic(), but extended to save "more states" </td></tr>
-<tr><td><a href="./help/toctoc.html">toctoc</a></td><td>Similar to MATLAB's toc(), but extended to save "more states" </td></tr>
-</table>
+<tr><td colspan="2"><h2>NXT Module Map Functions</h2></td></tr>
+<tr><td><a href="./help/MAP_GetCommModule.html">MAP_GetCommModule</a></td><td>Reads the IO map of the communication module</td></tr>
+<tr><td><a href="./help/MAP_GetInputModule.html">MAP_GetInputModule</a></td><td>Reads the IO map of the input module</td></tr>
+<tr><td><a href="./help/MAP_GetOutputModule.html">MAP_GetOutputModule</a></td><td>Reads the IO map of the output module</td></tr>
+<tr><td><a href="./help/MAP_GetSoundModule.html">MAP_GetSoundModule</a></td><td>Reads the IO map of the sound module</td></tr>
+<tr><td><a href="./help/MAP_GetUIModule.html">MAP_GetUIModule</a></td><td>Reads the IO map of the user interface module</td></tr>
+<tr><td><a href="./help/MAP_SetOutputModule.html">MAP_SetOutputModule</a></td><td>Writes the IO map to the output module</td></tr>
+<tr><td><br><br></td></tr>
 
 
-<!-- </font> -->
+<tr><td colspan="2"><h2>General Functions</h2></td></tr>
+<tr><td><a href="./help/checkStatusByte.html">checkStatusByte</a></td><td>Interpretes the status byte of a return package and creates an error message</td></tr>
+<tr><td><a href="./help/readFromIniFile.html">readFromIniFile</a></td><td>Reads parameters from a configuration file (usually *.ini)</td></tr>
+<tr><td><a href="./help/textOut.html">textOut</a></td><td>Wrapper for fprintf() which can optionally write screen output to a logfile</td></tr>
+<tr><td><a href="./help/tictic.html">tictic</a></td><td>Similar to MATLAB's tic(), but extended to save "more states"</td></tr>
+<tr><td><a href="./help/toctoc.html">toctoc</a></td><td>Similar to MATLAB's toc(), but extended to save "more states"</td></tr>
+<tr><td><br><br></td></tr>
 
+
+<tr><td colspan="2"><h2>Debug Functions</h2></td></tr>
+<tr><td><a href="./help/DebugMode.html">DebugMode</a></td><td>Gets or sets the debug state (i.e. if textOut will print messages to the command window)</td></tr>
+<tr><td><br><br></td></tr>
+
+
+</table>
 
 </body>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_GetDefaultNXT.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_GetDefaultNXT.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_GetDefaultNXT.html	(revision 254)
@@ -0,0 +1,93 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_GetDefaultNXT</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_GetDefaultNXT">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_GetDefaultNXT</h1>
+         <introduction>
+            <p>Returns the global default NXT handle if it was previously set</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#3">Example</a></li>
+               <li><a href="#4">See also</a></li>
+               <li><a href="#5">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>h = COM_GetDefaultNXT()</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>h = COM_GetDefaultNXT()</tt> returns the global default NXT handle <tt>h</tt> if it was previously set. The default global NXT handle is used by all NXT-Functions per default if no other handle is specified.
+            To set this global handle the function <tt>COM_SetDefaultNXT</tt> is used.
+         </p>
+         <h2>Example<a name="3"></a></h2><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+   COM_SetDefaultNXT(handle);
+   MyNXT = COM_GetDefaultNXT();
+   <span class="comment">% now MyNXT and handle refer to the same device</span>
+</pre><h2>See also<a name="4"></a></h2>
+         <p><a href="COM_SetDefaultNXT.html">COM_SetDefaultNXT</a>, <a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_OpenNXTEx.html">COM_OpenNXTEx</a></p>
+         <h2>Signature<a name="5"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/07
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_GetDefaultNXT
+% Returns the global default NXT handle if it was previously set
+%%
+%% Syntax
+% |h = COM_GetDefaultNXT()|
+%%
+%% Description
+% |h = COM_GetDefaultNXT()| returns the global default NXT handle |h| if it was previously
+% set. The default global NXT handle is used by all NXT-Functions per default if no other
+% handle is specified. To set this global handle the function |COM_SetDefaultNXT| is used.
+%%
+%% Example
+   handle = COM_OpenNXT('bluetooth.ini', 'check');
+   COM_SetDefaultNXT(handle);
+   MyNXT = COM_GetDefaultNXT();
+   % now MyNXT and handle refer to the same device
+%%
+%% See also
+% COM_SetDefaultNXT, COM_OpenNXT, COM_OpenNXTEx
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/07
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetRampMode.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetRampMode.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetRampMode.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SetRampMode</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetRampMode">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -89,5 +89,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMemoryCount.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMemoryCount.html	(revision 45)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMemoryCount.html	(revision 254)
@@ -5,5 +5,5 @@
    <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
+   
       <!--
 This HTML is auto-generated from an M-file.
@@ -12,5 +12,5 @@
       <title>GetMemoryCount</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetMemoryCount">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -43,5 +43,5 @@
          <h2>Examples<a name="5"></a></h2><pre class="codeinput">   memory = GetMemoryCount(MOTOR_A);
 </pre><h2>See also<a name="6"></a></h2>
-         <p><a href="SetMemoryCount.html">SetMemoryCount</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a></p>
+         <p><a href="SetMemoryCounter.html">SetMemoryCounter</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a></p>
          <h2>Signature<a name="7"></a></h2>
          <div>
@@ -51,5 +51,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -87,5 +87,5 @@
 % * *Author:* Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlayTone.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlayTone.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlayTone.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_PlayTone</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_PlayTone">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,19 +35,19 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>NXT_PlayTone(frequency, duration)</tt></p>
-         <p><tt>NXT_PlayTone(frequency, duration, bt_handle)</tt></p>
+         <p><tt>NXT_PlayTone(frequency, duration, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_PlayTone(frequency, duration)</tt> plays a tone of the <tt>frequency</tt> in Hz (200 - 14000Hz) and the <tt>duration</tt> in milli seconds.
          </p>
-         <p><tt>NXT_PlayTone(frequency, duration, bt_handle)</tt> sends the play tone command over the specific Bluetooth handle (serial handle (PC) / file handle (Linux)).
+         <p><tt>NXT_PlayTone(frequency, duration, handle)</tt> sends the play tone command over the specific NXT handle (e.g. struct containing a serial handle (PC) / file handle (Linux)).
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_PlayTone(440, 100);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   BT_SetDefaultHandle(bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   COM_SetDefaultNXT(handle);
    NXT_PlayTone(1200, 120);
 </pre><h2>See also<a name="9"></a></h2>
-         <p><a href="BT_GetDefaultHandle.html">BT_GetDefaultHandle</a></p>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
          <h2>Signature<a name="10"></a></h2>
          <div>
@@ -57,5 +57,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -72,5 +72,5 @@
 % |NXT_PlayTone(frequency, duration)|
 %%
-% |NXT_PlayTone(frequency, duration, bt_handle)|
+% |NXT_PlayTone(frequency, duration, handle)|
 %%
 %% Description
@@ -78,8 +78,8 @@
 % |duration| in milli seconds.
 %%
-% |NXT_PlayTone(frequency, duration, bt_handle)| sends the play tone command over the specific
-% Bluetooth handle (serial handle (PC) / file handle (Linux)).
+% |NXT_PlayTone(frequency, duration, handle)| sends the play tone command over the specific
+% NXT handle (e.g. struct containing a serial handle (PC) / file handle (Linux)).
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -88,10 +88,10 @@
    NXT_PlayTone(440, 100);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   BT_SetDefaultHandle(bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   COM_SetDefaultNXT(handle);
    NXT_PlayTone(1200, 120);
 %%
 %% See also
-% BT_GetDefaultHandle
+% COM_GetDefaultNXT
 %%
 %% Signature
@@ -99,5 +99,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SetDefaultNXT.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SetDefaultNXT.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SetDefaultNXT.html	(revision 254)
@@ -0,0 +1,91 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_SetDefaultNXT</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_SetDefaultNXT">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_SetDefaultNXT</h1>
+         <introduction>
+            <p>Sets a global default NXT handle that will be used by other functions if no handle is specified.</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#3">Example</a></li>
+               <li><a href="#4">See also</a></li>
+               <li><a href="#5">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>COM_SetDefaultNXT(h)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>COM_SetDefaultNXT(h)</tt> sets the given handle <tt>h</tt> to the global NXT handle, which is used by all NXT-Functions per default if no other handle is specified. To create and open
+            an NXT handle (Bluetooth or USB), the functions <tt>COM_OpenNXT</tt> and <tt>COM_OpenNXTEx</tt> can be used. To retrieve the global default handle user <tt>COM_GetDefaultNXT</tt>.
+         </p>
+         <h2>Example<a name="3"></a></h2><pre class="codeinput">   MyNXT = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+   COM_SetDefaultNXT(MyNXT);
+</pre><h2>See also<a name="4"></a></h2>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a>, <a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_OpenNXTEx.html">COM_OpenNXTEx</a></p>
+         <h2>Signature<a name="5"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/07
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_SetDefaultNXT
+% Sets a global default NXT handle that will be used by other functions if no handle is specified.
+%%
+%% Syntax
+% |COM_SetDefaultNXT(h)|
+%%
+%% Description
+% |COM_SetDefaultNXT(h)| sets the given handle |h| to the global NXT handle, which is used
+% by all NXT-Functions per default if no other handle is specified. To
+% create and open an NXT handle (Bluetooth or USB), the functions
+% |COM_OpenNXT| and |COM_OpenNXTEx| can be used. To retrieve the global default handle
+% user |COM_GetDefaultNXT|.
+%%
+%% Example
+   MyNXT = COM_OpenNXT('bluetooth.ini', 'check');
+   COM_SetDefaultNXT(MyNXT);
+%%
+%% See also
+% COM_GetDefaultNXT, COM_OpenNXT, COM_OpenNXTEx
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/07
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USGetSnapshotResults.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USGetSnapshotResults.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USGetSnapshotResults.html	(revision 254)
@@ -0,0 +1,130 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>USGetSnapshotResults</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_USGetSnapshotResults">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>USGetSnapshotResults</h1>
+         <introduction>
+            <p>Retrieves up to eight echos (distances) stored inside the US sensor</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#7">Example</a></li>
+               <li><a href="#8">See also</a></li>
+               <li><a href="#9">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>echos = USGetSnapshotResults(port)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>echos = USGetSnapshotResults(port)</tt> retrieves the echos originating from the ping that was sent out with <tt>USMakeSnapshot(port)</tt> for the ultrasonic sensor connected to <tt>port</tt>. In order for this to work, the sensor has to have been opened in snapshot mode using <tt>OpenUltrasonic(port, 'snapshot')</tt>.
+         </p>
+         <p>The vector <tt>echos</tt> always contains exactly 8 readings for up to 8 echos that were recorded from one single signal. Depending on the structure
+            and reflections, this can only be one valid echo, or a lot of interference. The values are distances, just as you'd expect
+            from <tt>GetUltrasonic</tt>. The values are sorted in order of appearance, so they should also be sorted with increasing distances.
+         </p>
+         <p>It is not known how exactly the measurements are to be interpreted!</p>
+         <p>Please make sure that after calling <tt>USGetSnapshotResults</tt>, there is a little time period for the sound waves to travel, to be reflected, and be recorded by the sensor. You can estimate
+            this using the speed of sound and the maximum distance you expect to measure.
+         </p>
+         <p>Note: When the US sensor is opened in snapshot mode, the function <tt>GetUltrasonic</tt> does not work correctly!
+         </p>
+         <h2>Example<a name="7"></a></h2><pre class="codeinput">  port = SENSOR_4;
+  OpenUltrasonic(port, <span class="string">'snapshot'</span>);
+  <span class="comment">% send out the ping</span>
+  USMakeSnapshot(port);
+  <span class="comment">% wait some time for the sound to travel</span>
+  pause(0.1); <span class="comment">% 100ms is probably too much, calculate using c_sound ;-)</span>
+  <span class="comment">% retrieve all the echos in 1 step</span>
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+</pre><h2>See also<a name="8"></a></h2>
+         <p><a href="OpenUltrasonic.html">OpenUltrasonic</a>, <a href="GetUltrasonic.html">GetUltrasonic</a>, <a href="USMakeSnapshot.html">USMakeSnapshot</a>, <a href="CloseSensor.html">CloseSensor</a></p>
+         <h2>Signature<a name="9"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/01/08
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% USGetSnapshotResults
+% Retrieves up to eight echos (distances) stored inside the US sensor
+%%
+%% Syntax
+% |echos = USGetSnapshotResults(port)|
+%%
+%% Description
+% |echos = USGetSnapshotResults(port)| retrieves the echos originating
+% from the ping that was sent out with |USMakeSnapshot(port)| for the ultrasonic
+% sensor connected to |port|. In order for this to work, the sensor has
+% to have been opened in snapshot mode using |OpenUltrasonic(port, 'snapshot')|.
+%%
+% The vector |echos| always contains exactly 8 readings for up to
+% 8 echos that were recorded from one single signal. Depending on the
+% structure and reflections, this can only be one valid echo, or a lot of
+% interference. The values are distances, just as you'd expect from
+% |GetUltrasonic|. The values are sorted in order of appearance, so they
+% should also be sorted with increasing distances.
+%%
+% It is not known how exactly the measurements are to be interpreted!
+%%
+% Please make sure that after calling |USGetSnapshotResults|, there is a
+% little time period for the sound waves to travel, to be reflected, and
+% be recorded by the sensor. You can estimate this using the speed of
+% sound and the maximum distance you expect to measure.
+%%
+% Note: When the US sensor is opened in snapshot mode, the function
+% |GetUltrasonic| does not work correctly!
+%%
+%% Example
+  port = SENSOR_4;
+  OpenUltrasonic(port, 'snapshot');
+  % send out the ping
+  USMakeSnapshot(port);
+  % wait some time for the sound to travel
+  pause(0.1); % 100ms is probably too much, calculate using c_sound ;-)
+  % retrieve all the echos in 1 step
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+%%
+%% See also
+% OpenUltrasonic, GetUltrasonic, USMakeSnapshot, CloseSensor
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/01/08
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/toctoc.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/toctoc.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/toctoc.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>toctoc</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_toctoc">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -55,5 +55,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -95,5 +95,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_3.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_3.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_3.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SENSOR_3</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SENSOR_3">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/DebugMode.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/DebugMode.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/DebugMode.html	(revision 254)
@@ -0,0 +1,125 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>DebugMode</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_DebugMode">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>DebugMode</h1>
+         <introduction>
+            <p>Gets or sets the debug state (i.e. if textOut will print messages to the command window)</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#7">Example</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>state = DebugMode();</tt></p>
+         <p><tt>DebugMode(state);</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p>The function <tt>textOut</tt> can be used to display text messages inside the command window. These messages can optionally be logged to a file (see textOut
+            for details) or the output can be disable. To turn off those debug messages, the global variable <tt>DisableScreenOut</tt> had to be modified in earlier toolbox versions. Now the function <tt>DebugMode</tt> provides easier access.
+         </p>
+         <p><tt>state = DebugMode();</tt> returns the current debug state, the return value is either <tt>'on'</tt> or <tt>'off'</tt>.
+         </p>
+         <p><tt>DebugMode(state);</tt> is used to switch between displaying messages and silent mode. The paramter <tt>state</tt> has to be <tt>'on'</tt> or <tt>'off'</tt>.
+         </p>
+         <p>Note: If you need a fast alternative to <tt>strcmpi(DebugMode(), 'on')</tt>, please consider the private toolbox function <tt>isdebug</tt>.
+         </p>
+         <h2>Example<a name="7"></a></h2><pre class="codeinput">  <span class="comment">% enable debug messages</span>
+  DebugMode <span class="string">on</span>
+</pre><pre class="codeinput">  <span class="comment">% remember old setting</span>
+  oldState = DebugMode();
+  DebugMode(<span class="string">'on'</span>);
+     <span class="comment">% do something with textOut(), it will be displayed!</span>
+  <span class="comment">% restore previous setting</span>
+  DebugMode(oldState);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="textOut.html">textOut</a>, <a href="isdebug (private).html">isdebug (private)</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/04
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% DebugMode
+% Gets or sets the debug state (i.e. if textOut will print messages to the command window)
+%%
+%% Syntax
+% |state = DebugMode();|
+%%
+% |DebugMode(state);|
+%%
+%%
+%% Description
+% The function |textOut| can be used to display text messages inside the command
+% window. These messages can optionally be logged to a file (see textOut for
+% details) or the output can be disable. To turn off those debug messages, the
+% global variable |DisableScreenOut| had to be modified in earlier toolbox
+% versions. Now the function |DebugMode| provides easier access.
+%%
+% |state = DebugMode();| returns the current debug state, the return value is
+% either |'on'| or |'off'|.
+%%
+% |DebugMode(state);| is used to switch between displaying messages and silent
+% mode. The paramter |state| has to be |'on'| or |'off'|.
+%%
+%%
+% Note: If you need a fast alternative to |strcmpi(DebugMode(), 'on')|, please
+% consider the private toolbox function |isdebug|.
+%%
+%% Example
+  % enable debug messages
+  DebugMode on
+%%
+  % remember old setting
+  oldState = DebugMode();
+  DebugMode('on');
+     % do something with textOut(), it will be displayed!
+  % restore previous setting
+  DebugMode(oldState);
+%%
+%%
+%% See also
+% textOut, isdebug (private)
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/04
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMemoryCount.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMemoryCount.html	(revision 45)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMemoryCount.html	(revision 254)
@@ -5,5 +5,5 @@
    <head>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
+   
       <!--
 This HTML is auto-generated from an M-file.
@@ -12,5 +12,5 @@
       <title>SetMemoryCount</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetMemoryCount">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -43,5 +43,5 @@
          <h2>Example<a name="5"></a></h2><pre class="codeinput">   SetMemoryCount(MOTOR_B, 120);
 </pre><h2>See also<a name="6"></a></h2>
-         <p><a href="GetMemoryCount.html">GetMemoryCount</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a></p>
+         <p><a href="SetMemoryCounter.html">SetMemoryCounter</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a></p>
          <h2>Signature<a name="7"></a></h2>
          <div>
@@ -51,5 +51,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -87,5 +87,5 @@
 % * *Author:* Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/Contents.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/Contents.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/Contents.html	(revision 254)
@@ -0,0 +1,187 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Contents</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="Contents">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content"><pre class="codeinput"><span class="comment">% RWTH - Mindstorms NXT Toolbox</span>
+<span class="comment">% Version 2.00beta 17-Jul-2008</span>
+<span class="comment">% Files</span>
+<span class="comment">%   checkStatusByte           - Interpretes the status byte of a return package and creates an error message</span>
+<span class="comment">%   CloseSensor               - Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor)</span>
+<span class="comment">%   COM_CloseNXT              - Closes and deletes a specific NXT handle, or clears all existing handles</span>
+<span class="comment">%   COM_CollectPacket         - Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet</span>
+<span class="comment">%   COM_CreatePacket          - Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)</span>
+<span class="comment">%   COM_GetDefaultNXT         - Returns the global default NXT handle if it was previously set</span>
+<span class="comment">%   COM_MakeBTConfigFile      - Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.</span>
+<span class="comment">%   COM_OpenNXT               - Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use</span>
+<span class="comment">%   COM_OpenNXTEx             - Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use</span>
+<span class="comment">%   COM_SendPacket            - Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)</span>
+<span class="comment">%   COM_SetDefaultNXT         - Sets a global default NXT handle that will be used by other functions if no handle is specified.</span>
+<span class="comment">%   DebugMode                 - Gets or sets the debug state (i.e. if textOut will print messages to the command window)</span>
+<span class="comment">%   GetLight                  - Reads the current value of the NXT light sensor</span>
+<span class="comment">%   GetMemoryCount            - Gets the internal NXT memory counter (manual mapping replica)</span>
+<span class="comment">%   GetMotor                  - Reads the current motor set by SetMotor(). Raises an error if no motor was set</span>
+<span class="comment">%   GetMotorSettings          - Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor</span>
+<span class="comment">%   GetSound                  - Reads the current value of the NXT sound sensor</span>
+<span class="comment">%   GetSwitch                 - Reads the current value of the NXT switch / touch sensor</span>
+<span class="comment">%   GetUltrasonic             - Reads the current value of the NXT ultrasonic sensor</span>
+<span class="comment">%   MAP_GetCommModule         - Reads the IO map of the communication module</span>
+<span class="comment">%   MAP_GetInputModule        - Reads the IO map of the input module</span>
+<span class="comment">%   MAP_GetOutputModule       - Reads the IO map of the output module</span>
+<span class="comment">%   MAP_GetSoundModule        - Reads the IO map of the sound module</span>
+<span class="comment">%   MAP_GetUIModule           - Reads the IO map of the user interface module</span>
+<span class="comment">%   MAP_SetOutputModule       - Writes the IO map to the output module</span>
+<span class="comment">%   MOTOR_A                   - Symbolic constant MOTOR_A (returns 0)</span>
+<span class="comment">%   MOTOR_B                   - Symbolic constant MOTOR_B (returns 1)</span>
+<span class="comment">%   MOTOR_C                   - Symbolic constant MOTOR_C (returns 2)</span>
+<span class="comment">%   MotorRotateAbs            - Rotates a motor to an absolute angle</span>
+<span class="comment">%   NXT_GetBatteryLevel       - Returns the current battery level in milli volts</span>
+<span class="comment">%   NXT_GetFirmwareVersion    - Returns the protocol and firmware version of the NXT</span>
+<span class="comment">%   NXT_GetInputValues        - Processes a complete sensor reading, i.e. requests input values and collects the answer.</span>
+<span class="comment">%   NXT_GetOutputState        - Requests and retrieves an output motor state reading</span>
+<span class="comment">%   NXT_LSGetStatus           - Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic)</span>
+<span class="comment">%   NXT_LSRead                - Reads data from a low speed (digital) sensor</span>
+<span class="comment">%   NXT_LSWrite               - Writes the given data to a low speed (digital) sensor</span>
+<span class="comment">%   NXT_PlaySoundFile         - Plays the given sound file on the NXT Brick</span>
+<span class="comment">%   NXT_PlayTone              - Plays a tone with the given frequency and duration</span>
+<span class="comment">%   NXT_ReadIOMap             - Reads the IO map of the given module ID</span>
+<span class="comment">%   NXT_ResetInputScaledValue - Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode)</span>
+<span class="comment">%   NXT_ResetMotorPosition    - Resets NXT internal counter for specified motor, relative or absolute counter</span>
+<span class="comment">%   NXT_SendKeepAlive         - Sends a KeepAlive packet. Optional: requests sleep time limit.</span>
+<span class="comment">%   NXT_SetBrickName          - Sets a new name for the NXT Brick (connected to the specified handle)</span>
+<span class="comment">%   NXT_SetInputMode          - Sets mode, configures and initializes sensor ready to be read out</span>
+<span class="comment">%   NXT_SetOutputState        - Sends previously specified settings to current active motor.</span>
+<span class="comment">%   NXT_StartProgram          - Starts the given program on the NXT Brick</span>
+<span class="comment">%   NXT_StopProgram           - Stops a specific program on the NXT Brick</span>
+<span class="comment">%   NXT_StopSoundPlayback     - Stops the current sound playback</span>
+<span class="comment">%   NXT_WriteIOMap            - Writes the IO map to the given module ID</span>
+<span class="comment">%   OpenLight                 - Sets the parameter mode of the NXT light sensor</span>
+<span class="comment">%   OpenSound                 - Sets the parameter mode of the NXT sound sensor</span>
+<span class="comment">%   OpenSwitch                - Sets the parameter mode of the NXT switch / touch sensor</span>
+<span class="comment">%   OpenUltrasonic            - Initializes and sets the mode of the NXT ultrasonic sensor</span>
+<span class="comment">%   readFromIniFile           - Reads parameters from a configuration file (usually *.ini)</span>
+<span class="comment">%   ResetMotorAngle           - Resets the relative angle counter for the given motor</span>
+<span class="comment">%   SendMotorSettings         - Sends previously specified settings to current active motor.</span>
+<span class="comment">%   SENSOR_1                  - Symbolic constant SENSOR_1 (returns 0)</span>
+<span class="comment">%   SENSOR_2                  - Symbolic constant SENSOR_2 (returns 1)</span>
+<span class="comment">%   SENSOR_3                  - Symbolic constant SENSOR_3 (returns 2)</span>
+<span class="comment">%   SENSOR_4                  - Symbolic constant SENSOR_4 (returns 3)</span>
+<span class="comment">%   SetAngleLimit             - Sets the angle limit (in degrees) of the current motor port</span>
+<span class="comment">%   SetMemoryCount            - Sets the internal NXT memory counter (manual mapping replica)</span>
+<span class="comment">%   SetMotor                  - Sets the current motor to use for motor setting commands</span>
+<span class="comment">%   SetPower                  - Sets the power of the current active motor</span>
+<span class="comment">%   SetRampMode               - Sets the runstate of the current active motor</span>
+<span class="comment">%   SetTurnRatio              - Sets the turn ratio of the current active motor</span>
+<span class="comment">%   SpeedRegulation           - Enables / disables the speed regulation mode of the current active motor</span>
+<span class="comment">%   StopMotor                 - Stops / brakes specified motor. (Synchronisation will be lost after this)</span>
+<span class="comment">%   SwitchLamp                - Switches the LEGO lamp on or off (has to be connected to a motor port)</span>
+<span class="comment">%   SyncToMotor               - Enables synchronization regulation for current active and specified motor</span>
+<span class="comment">%   textOut                   - Wrapper for fprintf() which can optionally write screen output to a logfile</span>
+<span class="comment">%   tictic                    - Similar to MATLAB's tic(), but extended to save "more states"</span>
+<span class="comment">%   toctoc                    - Similar to MATLAB's toc(), but extended to save "more states"</span>
+<span class="comment">%   USGetSnapshotResults      - Retrieves up to eight echos (distances) stored inside the US sensor</span>
+<span class="comment">%   USMakeSnapshot            - Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos</span>
+<span class="comment">%   WaitForMotor              - Pauses execution until specific motor is not running anymore.</span>
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+% RWTH - Mindstorms NXT Toolbox 
+% Version 2.00beta 17-Jul-2008
+% Files
+%   checkStatusByte           - Interpretes the status byte of a return package and creates an error message
+%   CloseSensor               - Closes a specified sensor port (e.g. turns off the active light mode of the NXT light sensor)
+%   COM_CloseNXT              - Closes and deletes a specific NXT handle, or clears all existing handles
+%   COM_CollectPacket         - Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet
+%   COM_CreatePacket          - Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)
+%   COM_GetDefaultNXT         - Returns the global default NXT handle if it was previously set
+%   COM_MakeBTConfigFile      - Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.
+%   COM_OpenNXT               - Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use
+%   COM_OpenNXTEx             - Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use
+%   COM_SendPacket            - Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)
+%   COM_SetDefaultNXT         - Sets a global default NXT handle that will be used by other functions if no handle is specified.
+%   DebugMode                 - Gets or sets the debug state (i.e. if textOut will print messages to the command window)
+%   GetLight                  - Reads the current value of the NXT light sensor
+%   GetMemoryCount            - Gets the internal NXT memory counter (manual mapping replica)
+%   GetMotor                  - Reads the current motor set by SetMotor(). Raises an error if no motor was set
+%   GetMotorSettings          - Returns the current motor data / settings (e.g. position, speed, etc.) from the specified motor
+%   GetSound                  - Reads the current value of the NXT sound sensor
+%   GetSwitch                 - Reads the current value of the NXT switch / touch sensor
+%   GetUltrasonic             - Reads the current value of the NXT ultrasonic sensor
+%   MAP_GetCommModule         - Reads the IO map of the communication module
+%   MAP_GetInputModule        - Reads the IO map of the input module
+%   MAP_GetOutputModule       - Reads the IO map of the output module
+%   MAP_GetSoundModule        - Reads the IO map of the sound module
+%   MAP_GetUIModule           - Reads the IO map of the user interface module
+%   MAP_SetOutputModule       - Writes the IO map to the output module
+%   MOTOR_A                   - Symbolic constant MOTOR_A (returns 0)
+%   MOTOR_B                   - Symbolic constant MOTOR_B (returns 1)
+%   MOTOR_C                   - Symbolic constant MOTOR_C (returns 2)
+%   MotorRotateAbs            - Rotates a motor to an absolute angle
+%   NXT_GetBatteryLevel       - Returns the current battery level in milli volts
+%   NXT_GetFirmwareVersion    - Returns the protocol and firmware version of the NXT
+%   NXT_GetInputValues        - Processes a complete sensor reading, i.e. requests input values and collects the answer.
+%   NXT_GetOutputState        - Requests and retrieves an output motor state reading
+%   NXT_LSGetStatus           - Gets the number of available bytes from low speed (digital) sensor (e.g. ultrasonic)
+%   NXT_LSRead                - Reads data from a low speed (digital) sensor
+%   NXT_LSWrite               - Writes the given data to a low speed (digital) sensor
+%   NXT_PlaySoundFile         - Plays the given sound file on the NXT Brick
+%   NXT_PlayTone              - Plays a tone with the given frequency and duration 
+%   NXT_ReadIOMap             - Reads the IO map of the given module ID
+%   NXT_ResetInputScaledValue - Resets the sensors ScaledVal back to 0, depends on currently configured mode (see NXT_SetInputMode)
+%   NXT_ResetMotorPosition    - Resets NXT internal counter for specified motor, relative or absolute counter
+%   NXT_SendKeepAlive         - Sends a KeepAlive packet. Optional: requests sleep time limit.
+%   NXT_SetBrickName          - Sets a new name for the NXT Brick (connected to the specified handle)
+%   NXT_SetInputMode          - Sets mode, configures and initializes sensor ready to be read out
+%   NXT_SetOutputState        - Sends previously specified settings to current active motor.
+%   NXT_StartProgram          - Starts the given program on the NXT Brick
+%   NXT_StopProgram           - Stops a specific program on the NXT Brick
+%   NXT_StopSoundPlayback     - Stops the current sound playback
+%   NXT_WriteIOMap            - Writes the IO map to the given module ID
+%   OpenLight                 - Sets the parameter mode of the NXT light sensor
+%   OpenSound                 - Sets the parameter mode of the NXT sound sensor
+%   OpenSwitch                - Sets the parameter mode of the NXT switch / touch sensor
+%   OpenUltrasonic            - Initializes and sets the mode of the NXT ultrasonic sensor
+%   readFromIniFile           - Reads parameters from a configuration file (usually *.ini)
+%   ResetMotorAngle           - Resets the relative angle counter for the given motor
+%   SendMotorSettings         - Sends previously specified settings to current active motor.
+%   SENSOR_1                  - Symbolic constant SENSOR_1 (returns 0)
+%   SENSOR_2                  - Symbolic constant SENSOR_2 (returns 1)
+%   SENSOR_3                  - Symbolic constant SENSOR_3 (returns 2)
+%   SENSOR_4                  - Symbolic constant SENSOR_4 (returns 3)
+%   SetAngleLimit             - Sets the angle limit (in degrees) of the current motor port
+%   SetMemoryCount            - Sets the internal NXT memory counter (manual mapping replica)
+%   SetMotor                  - Sets the current motor to use for motor setting commands
+%   SetPower                  - Sets the power of the current active motor
+%   SetRampMode               - Sets the runstate of the current active motor
+%   SetTurnRatio              - Sets the turn ratio of the current active motor
+%   SpeedRegulation           - Enables / disables the speed regulation mode of the current active motor
+%   StopMotor                 - Stops / brakes specified motor. (Synchronisation will be lost after this)
+%   SwitchLamp                - Switches the LEGO lamp on or off (has to be connected to a motor port)
+%   SyncToMotor               - Enables synchronization regulation for current active and specified motor
+%   textOut                   - Wrapper for fprintf() which can optionally write screen output to a logfile
+%   tictic                    - Similar to MATLAB's tic(), but extended to save "more states"
+%   toctoc                    - Similar to MATLAB's toc(), but extended to save "more states"
+%   USGetSnapshotResults      - Retrieves up to eight echos (distances) stored inside the US sensor
+%   USMakeSnapshot            - Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos
+%   WaitForMotor              - Pauses execution until specific motor is not running anymore. 
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/readFromIniFile.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/readFromIniFile.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/readFromIniFile.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>readFromIniFile</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_readFromIniFile">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -67,5 +67,5 @@
                <li><b>Date:</b> 2008/01/08
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -123,5 +123,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2008/01/08
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_B.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_B.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_B.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>MOTOR_B</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_MOTOR_B">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSRead.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSRead.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSRead.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_LSRead</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_LSRead">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          <p><tt>[data BytesRead] = NXT_LSRead(port, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
@@ -50,9 +50,9 @@
          <p>Before using LS commands, the sensor mode has to be set to <tt>LOWSPEED_9V</tt> using the NXT_SetInputMode command.
          </p>
-         <h2>Examples<a name="10"></a></h2><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+         <h2>Examples<a name="10"></a></h2><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
 
    NXT_SetInputMode(SENSOR_1, <span class="string">'LOWSPEED_9V'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>);
    <span class="comment">% usually we would use NXT_LSWrite before, to request some sort of reply</span>
-   [data BytesRead] = NXT_LSRead(SENSOR_1, bt_handle);
+   [data BytesRead] = NXT_LSRead(SENSOR_1, handle);
 </pre><h2>See also<a name="11"></a></h2>
          <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="NXT_LSWrite.html">NXT_LSWrite</a>, <a href="NXT_LSGetStatus.html">NXT_LSGetStatus</a></p>
@@ -64,5 +64,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -90,5 +90,5 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %%
@@ -106,9 +106,9 @@
 %%
 %% Examples
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
+   handle = COM_OpenNXT('bluetooth.ini','check');
 
    NXT_SetInputMode(SENSOR_1, 'LOWSPEED_9V', 'RAWMODE', 'dontreply');
    % usually we would use NXT_LSWrite before, to request some sort of reply
-   [data BytesRead] = NXT_LSRead(SENSOR_1, bt_handle);
+   [data BytesRead] = NXT_LSRead(SENSOR_1, handle);
 %%
 %% See also
@@ -120,5 +120,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MotorRotateAbs.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MotorRotateAbs.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MotorRotateAbs.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>MotorRotateAbs</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_MotorRotateAbs">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -50,5 +50,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -86,5 +86,5 @@
 % * *Author:* Robter Schwann, Bernd Neumann (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USMakeSnapshot.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USMakeSnapshot.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/USMakeSnapshot.html	(revision 254)
@@ -0,0 +1,113 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>USMakeSnapshot</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_USMakeSnapshot">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>USMakeSnapshot</h1>
+         <introduction>
+            <p>Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#4">Example</a></li>
+               <li><a href="#5">See also</a></li>
+               <li><a href="#6">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>USMakeSnapshot(port)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p>Call <tt>USMakeSnapshot(port)</tt> to make the specific ultrasonic sensor connected to <tt>port</tt> send out one single signal (called "ping"). In contrast to the US sensor's continous mode (that is invoked by a normal <tt>OpenUltrasonic</tt> without the <tt>'snapshot'</tt> parameter), the sensor will only send out ultrasonic signals when this function is called. Up to 8 multiple echos will be
+            recorded, and the according distances stored in the sensor's internal memory. Use <tt>USGetSnapshotResults</tt> to retrieve those 8 readings in one step!
+         </p>
+         <p>Note: When the US sensor is opened in snapshot mode, the function <tt>GetUltrasonic</tt> does not work correctly!
+         </p>
+         <h2>Example<a name="4"></a></h2><pre class="codeinput">  port = SENSOR_4;
+  OpenUltrasonic(port, <span class="string">'snapshot'</span>);
+  <span class="comment">% send out the ping</span>
+  USMakeSnapshot(port);
+  <span class="comment">% wait some time for the sound to travel</span>
+  pause(0.1); <span class="comment">% 100ms is probably too much, calculate using c_sound ;-)</span>
+  <span class="comment">% retrieve all the echos in 1 step</span>
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+</pre><h2>See also<a name="5"></a></h2>
+         <p><a href="OpenUltrasonic.html">OpenUltrasonic</a>, <a href="GetUltrasonic.html">GetUltrasonic</a>, <a href="USGetSnapshotResults.html">USGetSnapshotResults</a>, <a href="CloseSensor.html">CloseSensor</a></p>
+         <h2>Signature<a name="6"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/01/08
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% USMakeSnapshot
+% Causes the ultrasonic sensor to send one snapshot ("ping") and record the echos
+%%
+%% Syntax
+% |USMakeSnapshot(port)|
+%%
+%% Description
+% Call |USMakeSnapshot(port)| to make the specific ultrasonic sensor
+% connected to |port| send out one single signal (called "ping"). In
+% contrast to the US sensor's continous mode (that is invoked by a normal
+% |OpenUltrasonic| without the |'snapshot'| parameter), the sensor will
+% only send out ultrasonic signals when this function is called. Up to 8
+% multiple echos will be recorded, and the according distances stored in
+% the sensor's internal memory. Use |USGetSnapshotResults| to retrieve
+% those 8 readings in one step!
+%%
+% Note: When the US sensor is opened in snapshot mode, the function
+% |GetUltrasonic| does not work correctly!
+%%
+%% Example
+  port = SENSOR_4;
+  OpenUltrasonic(port, 'snapshot');
+  % send out the ping
+  USMakeSnapshot(port);
+  % wait some time for the sound to travel
+  pause(0.1); % 100ms is probably too much, calculate using c_sound ;-)
+  % retrieve all the echos in 1 step
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+%%
+%% See also
+% OpenUltrasonic, GetUltrasonic, USGetSnapshotResults, CloseSensor
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/01/08
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopProgram.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopProgram.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopProgram.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_StopProgram</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_StopProgram">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,16 +35,16 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>NXT_StopProgram()</tt></p>
-         <p><tt>NXT_StopProgram(bt_handle)</tt></p>
+         <p><tt>NXT_StopProgram(handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_StopProgram()</tt> stops the current running embedded NXT Brick program.
          </p>
-         <p><tt>NXT_StopProgram(bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>NXT_StopProgram(handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_StopProgram();
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   NXT_StopProgram(bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_StopProgram(handle);
 </pre><h2>See also<a name="9"></a></h2>
          <p><a href="NXT_StartProgram.html">NXT_StartProgram</a></p>
@@ -56,5 +56,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -71,13 +71,13 @@
 % |NXT_StopProgram()|
 %%
-% |NXT_StopProgram(bt_handle)|
+% |NXT_StopProgram(handle)|
 %%
 %% Description
 % |NXT_StopProgram()| stops the current running embedded NXT Brick program.
 %%
-% |NXT_StopProgram(bt_handle)| uses the given Bluetooth connection |handle|. This should be
-% a serial handle on a PC system and a file handle on a Linux system.
+% |NXT_StopProgram(handle)| uses the given NXT connection |handle|. This should be
+% a struct containing a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -86,6 +86,6 @@
    NXT_StopProgram();
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   NXT_StopProgram(bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_StopProgram(handle);
 %%
 %% See also
@@ -96,5 +96,5 @@
 % * *Author:* Alexander Behrens, Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetLight.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetLight.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetLight.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetLight</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetLight">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -53,5 +53,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -90,5 +90,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSound.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSound.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSound.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>OpenSound</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_OpenSound">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -87,5 +87,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetFirmwareVersion.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetFirmwareVersion.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetFirmwareVersion.html	(revision 254)
@@ -0,0 +1,102 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>NXT_GetFirmwareVersion</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_NXT_GetFirmwareVersion">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>NXT_GetFirmwareVersion</h1>
+         <introduction>
+            <p>Returns the protocol and firmware version of the NXT</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#6">Examples</a></li>
+               <li><a href="#8">See also</a></li>
+               <li><a href="#9">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>[protocol_version firmware_version] = NXT_GetFirmwareVersion()</tt></p>
+         <p><tt>[protocol_version firmware_version] = NXT_GetFirmwareVersion(handle)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>[protocol_version firmware_version] = NXT_GetFirmwareVersion()</tt> returns the protocol and firmware version of the NXT as strings.
+         </p>
+         <p><tt>[protocol_version firmware_version] = NXT_GetFirmwareVersion(handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
+         </p>
+         <p>If no NXT <tt>handle</tt> is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
+         </p>
+         <h2>Examples<a name="6"></a></h2><pre class="codeinput">   [protocol_version firmware_version] = NXT_GetFirmwareVersion();
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   [protocol_version firmware_version] = NXT_GetFirmwareVersion(handle);
+</pre><h2>See also<a name="8"></a></h2>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
+         <h2>Signature<a name="9"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% NXT_GetFirmwareVersion
+% Returns the protocol and firmware version of the NXT
+%%
+%% Syntax
+% |[protocol_version firmware_version] = NXT_GetFirmwareVersion()|
+%%
+% |[protocol_version firmware_version] = NXT_GetFirmwareVersion(handle)|
+%%
+%% Description
+% |[protocol_version firmware_version] = NXT_GetFirmwareVersion()| returns the protocol and
+% firmware version of the NXT as strings.
+%%
+% |[protocol_version firmware_version] = NXT_GetFirmwareVersion(handle)| uses the given
+% NXT connection |handle|. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
+%%
+% If no NXT |handle| is specified the default one (|COM_GetDefaultNXT|) is used.
+%%
+%% Examples
+   [protocol_version firmware_version] = NXT_GetFirmwareVersion();
+%%
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   [protocol_version firmware_version] = NXT_GetFirmwareVersion(handle);
+%%
+%% See also
+% COM_GetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/textOut.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/textOut.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/textOut.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>textOut</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_textOut">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -72,5 +72,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -141,5 +141,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StartProgram.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StartProgram.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StartProgram.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_StartProgram</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_StartProgram">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,16 +35,16 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>NXT_StartProgram(filename)</tt></p>
-         <p><tt>NXT_StartProgram(filename, bt_handle)</tt></p>
+         <p><tt>NXT_StartProgram(filename, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_StartProgram(filename)</tt> starts the embedded NXT Brick program determined by the string <tt>filename</tt>. The maximum length is limited to 15 characters. The file extension <tt>'.rxe'</tt> is added automatically if it was omitted.
          </p>
-         <p><tt>NXT_SetBrickName(name, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>NXT_SetBrickName(name, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_StartProgram(<span class="string">'ResetCounter'</span>);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   NXT_StartProgram(<span class="string">'Demo.rxe'</span>, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_StartProgram(<span class="string">'Demo.rxe'</span>, handle);
 </pre><h2>See also<a name="9"></a></h2>
          <p><a href="NXT_StopProgram.html">NXT_StopProgram</a></p>
@@ -56,5 +56,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -71,5 +71,5 @@
 % |NXT_StartProgram(filename)|
 %%
-% |NXT_StartProgram(filename, bt_handle)|
+% |NXT_StartProgram(filename, handle)|
 %%
 %% Description
@@ -78,8 +78,8 @@
 % extension |'.rxe'| is added automatically if it was omitted.
 %%
-% |NXT_SetBrickName(name, bt_handle)| uses the given Bluetooth connection |handle|. This should be
-% a serial handle on a PC system and a file handle on a Linux system.
+% |NXT_SetBrickName(name, handle)| uses the given NXT connection |handle|. This should be
+% a struct containing a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -88,6 +88,6 @@
    NXT_StartProgram('ResetCounter');
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   NXT_StartProgram('Demo.rxe', bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_StartProgram('Demo.rxe', handle);
 %%
 %% See also
@@ -98,5 +98,5 @@
 % * *Author:* Alexander Behrens, Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetUltrasonic.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetUltrasonic.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetUltrasonic.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetUltrasonic</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetUltrasonic">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -44,5 +44,5 @@
    CloseSensor(SENSOR_4);
 </pre><h2>See also<a name="5"></a></h2>
-         <p><a href="NXT_LSRead.html">NXT_LSRead</a>, <a href="NXT_LSWrite.html">NXT_LSWrite</a>, <a href="OpenUltrasonic.html">OpenUltrasonic</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>
+         <p><a href="OpenUltrasonic.html">OpenUltrasonic</a>, <a href="USMakeSnapshot.html">USMakeSnapshot</a>, <a href="USGetSnapshotResults.html">USGetSnapshotResults</a>, <a href="CloseSensor.html">CloseSensor</a>, <a href="NXT_LSRead.html">NXT_LSRead</a>, <a href="NXT_LSWrite.html">NXT_LSWrite</a></p>
          <h2>Signature<a name="6"></a></h2>
          <div>
@@ -50,7 +50,7 @@
                <li><b>Author:</b> Linus Atorf, Alexander Behrens (see AUTHORS)
                </li>
-               <li><b>Date:</b> 2007/10/15
+               <li><b>Date:</b> 2008/01/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -82,12 +82,11 @@
 %%
 %% See also
-% NXT_LSRead, NXT_LSWrite, OpenUltrasonic, CloseSensor, SENSOR_1, SENSOR_2, SENSOR_3,
-% SENSOR_4
+% OpenUltrasonic, USMakeSnapshot, USGetSnapshotResults, CloseSensor, NXT_LSRead, NXT_LSWrite
 %%
 %% Signature
 %%
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
-% * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Date:* 2008/01/15
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_MakeBTConfigFile.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_MakeBTConfigFile.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_MakeBTConfigFile.html	(revision 254)
@@ -0,0 +1,97 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_MakeBTConfigFile</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_MakeBTConfigFile">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_MakeBTConfigFile</h1>
+         <introduction>
+            <p>Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#4">Example</a></li>
+               <li><a href="#5">See also</a></li>
+               <li><a href="#6">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>COM_MakeBTConfigFile()</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>COM_MakeBTConfigFile()</tt> starts a user guided dialog window to select the output directory, the file name and the Bluetooth paramters like e.g. COM
+            port.
+         </p>
+         <p>The little program creates a specific Bluetooth configuration file for the current PC system. Make sure the configuration
+            file is accessible under MATLAB if you try to open a Bluetooth connection using <tt>COM_OpenNXT</tt> and the correct file name.
+         </p>
+         <h2>Example<a name="4"></a></h2><pre class="codeinput">   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+</pre><h2>See also<a name="5"></a></h2>
+         <p><a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_CloseNXT.html">COM_CloseNXT</a>, <a href="COM_OpenNXTEx.html">COM_OpenNXTEx</a></p>
+         <h2>Signature<a name="6"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/09
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_MakeBTConfigFile
+% Creates a Bluetooth configuration file which is needed to open a Bluetooth connection.
+%%
+%% Syntax
+% |COM_MakeBTConfigFile()|
+%%
+%% Description
+% |COM_MakeBTConfigFile()| starts a user guided dialog window to select the output directory,
+% the file name and the Bluetooth paramters like e.g. COM port.
+%%
+% The little program creates a specific Bluetooth configuration file for the current PC system.
+% Make sure the configuration file is accessible under MATLAB if you try to open a Bluetooth
+% connection using |COM_OpenNXT| and the correct file name.
+%%
+%% Example
+   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT('bluetooth.ini', 'check');
+%%
+%% See also
+% COM_OpenNXT, COM_CloseNXT, COM_OpenNXTEx
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/07/09
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CreatePacket.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CreatePacket.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CreatePacket.html	(revision 254)
@@ -0,0 +1,125 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_CreatePacket</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_CreatePacket">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_CreatePacket</h1>
+         <introduction>
+            <p>Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#6">Example</a></li>
+               <li><a href="#7">See also</a></li>
+               <li><a href="#8">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>bytes = COM_CreatePacket(CommandType, Command, ReplyMode, ContentBytes)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>bytes = COM_CreatePacket(CommandType, Command, ReplyMode, ContentBytes)</tt> creates a valid Bluetooth packet conform to the LEGO Mindstorms communication protocol. The <tt>CommandType</tt> specifies the telegram type (direct or system command (see the LEGO Mindstorms communication protocol documentation for more
+            details)). This type is determined from the function <tt>name2commandbytes</tt>. The <tt>Command</tt> specifies the actual command according to the LEGO Mindstorms communication protocol. By the <tt>ReplyMode</tt> one can request an acknowledgement for the packet transmission. The two strings <tt>'reply'</tt> and <tt>'dontreply'</tt> are valid. The content byte-array is given by the <tt>ContentBytes</tt>.
+         </p>
+         <p>The return value <tt>bytes</tt> represents the complete Bluetooth packet conform to the LEGO Mindstorms Communication protocol.
+         </p>
+         <p><b>Note:</b></p>
+         <p>The activated <tt>ReplyMode</tt> should only be used if it is necessary. According to the official LEGO statement "Testing during development has shown that
+            the Bluetooth Serial Port communication has some disadvantages when it comes to streaming data. ... One problem is a time
+            penalty (of around 30ms) within the Bluecore chip when switching from receive-mode to transmit-mode. ... To handle the problem
+            of the time penalty within the Bluecore chip, users should send data using Bluetooth without requesting a reply package. This
+            will mean that the Bluecore chip won't have to switch direction for every received package and will not incur a 30ms penalty
+            for every data package."
+         </p>
+         <h2>Example<a name="6"></a></h2><pre class="codeinput">   [type cmd] = name2commandbytes(<span class="string">'PLAYTONE'</span>);
+   content(1:2) = dec2wordbytes(frequency, 2);
+   content(3:4) = dec2wordbytes(duration, 2);
+
+   packet = COM_CreatePacket(type, cmd, <span class="string">'dontreply'</span>, content);
+</pre><h2>See also<a name="7"></a></h2>
+         <p><a href="COM_SendPacket.html">COM_SendPacket</a>, <a href="COM_CollectPacket.html">COM_CollectPacket</a>, <a href="name2commandbytes.html">name2commandbytes</a>, <a href="dec2wordbytes.html">dec2wordbytes</a></p>
+         <h2>Signature<a name="8"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/09
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_CreatePacket
+% Generates a valid Bluetooth packet ready for transmission (i.e. calculates length)
+%%
+%% Syntax
+% |bytes = COM_CreatePacket(CommandType, Command, ReplyMode, ContentBytes)|
+%%
+%% Description
+% |bytes = COM_CreatePacket(CommandType, Command, ReplyMode, ContentBytes)| creates a valid
+% Bluetooth packet conform to the LEGO Mindstorms communication protocol. The |CommandType|
+% specifies the telegram type (direct or system command (see the
+% LEGO Mindstorms communication protocol documentation for more details)). This type is determined
+% from the function |name2commandbytes|. The |Command| specifies the actual command according to
+% the LEGO Mindstorms communication protocol. By the |ReplyMode| one can request an
+% acknowledgement for the packet transmission. The two strings |'reply'| and |'dontreply'| are
+% valid. The content byte-array is given by the |ContentBytes|.
+%%
+% The return value |bytes| represents the complete Bluetooth packet conform to the LEGO Mindstorms
+% Communication protocol.
+%%
+%%
+% *Note:*
+%%
+% The activated |ReplyMode| should only be used if it is necessary. According to the official
+% LEGO statement "Testing during development has shown that the Bluetooth Serial Port
+% communication has some disadvantages when it comes to streaming data. ... One problem is a time
+% penalty (of around 30ms) within the Bluecore chip when switching from receive-mode to
+% transmit-mode. ... To handle the problem of the time penalty within the Bluecore chip, users
+% should send data using Bluetooth without requesting a reply package. This will mean that the
+% Bluecore chip won't have to switch direction for every received package and will not incur a
+% 30ms penalty for every data package."
+%%
+%% Example
+   [type cmd] = name2commandbytes('PLAYTONE');
+   content(1:2) = dec2wordbytes(frequency, 2);
+   content(3:4) = dec2wordbytes(duration, 2);
+
+   packet = COM_CreatePacket(type, cmd, 'dontreply', content);
+%%
+%% See also
+% COM_SendPacket, COM_CollectPacket, name2commandbytes, dec2wordbytes
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/09
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetOutputState.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetOutputState.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetOutputState.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_GetOutputState</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_GetOutputState">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          <p><tt>data = NXT_GetOutputState(port, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p><b>Output:</b></p>
@@ -76,6 +76,6 @@
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="23"></a></h2><pre class="codeinput">   data = NXT_GetOutputState(MOTOR_B);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   data = NXT_GetOutputState(MOTOR_A, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   data = NXT_GetOutputState(MOTOR_A, handle);
 </pre><h2>See also<a name="25"></a></h2>
          <p><a href="GetMotorSettings.html">GetMotorSettings</a>, <a href="SendMotorSettings.html">SendMotorSettings</a>, <a href="NXT_SetOutputState.html">NXT_SetOutputState</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a></p>
@@ -87,5 +87,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -113,5 +113,5 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %%
@@ -153,6 +153,6 @@
    data = NXT_GetOutputState(MOTOR_B);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   data = NXT_GetOutputState(MOTOR_A, bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   data = NXT_GetOutputState(MOTOR_A, handle);
 %%
 %% See also
@@ -163,5 +163,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_4.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_4.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_4.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SENSOR_4</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SENSOR_4">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/WaitForMotor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/WaitForMotor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/WaitForMotor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>WaitForMotor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_WaitForMotor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -66,5 +66,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -121,5 +121,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetCommModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetCommModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetCommModule.html	(revision 254)
@@ -0,0 +1,199 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_GetCommModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_GetCommModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_GetCommModule</h1>
+         <introduction>
+            <p>Reads the IO map of the communication module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#31">Examples</a></li>
+               <li><a href="#32">See also</a></li>
+               <li><a href="#33">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>map = MAP_GetCommModule()</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>map = MAP_GetCommModule()</tt> returns the IO map of the communication module. The return value <tt>map</tt> is a struct variable. It contains all communication module information.
+         </p>
+         <p><b>Output:</b></p>
+         <p><tt>map.PFunc</tt>              % ?
+         </p>
+         <p><tt>map.PFuncTwo</tt>           % ?
+         </p>
+         <p><tt>map.BTPort</tt>             % 1x4 cell array contains Bluetooth device information of each NXT Bluetooth port (i = 0..3)
+         </p>
+         <p><tt>map.BTPort{i}.BtDeviceTableName</tt>            % name of the Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtDeviceTableClassOfDevice</tt>   % class of the Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtDeviceTableBdAddr</tt>          % MAC address of the Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtDeviceTableDeviceStatus</tt>    % status of the Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTableName</tt>           % name of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTableClassOfDevice</tt>  % class of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTablePinCode</tt>        % pin code of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnetTableBdAddr</tt>          % MAC address of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTableHandleNr</tt>       % handle nr of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTableStreamStatus</tt>   % stream status of the connected Bluetooth device
+         </p>
+         <p><tt>map.BTPort{i}.BtConnectTableLinkQuality</tt>    % link quality of the connected Bluetooth device
+         </p>
+         <p><tt>map.BrickDataName</tt>               % name of the NXT brick
+         </p>
+         <p><tt>map.BrickDataBluecoreVersion</tt>    % Bluecore version number
+         </p>
+         <p><tt>map.BrickDataBdAddr</tt>             % MAC address of the NXT brick
+         </p>
+         <p><tt>map.BrickDataBtStateStatus</tt>      % Bluetooth state status
+         </p>
+         <p><tt>map.BrickDataBtHwStatus</tt>         % NXT hardware status
+         </p>
+         <p><tt>map.BrickDataTimeOutValue</tt>       % time out value
+         </p>
+         <p><tt>map.BtDeviceCnt</tt>                 % number of devices defined within the Bluetooth device table
+         </p>
+         <p><tt>map.BtDeviceNameCnt</tt>             % number of devices defined within the Bluetooth device table (usually equal to BtDeviceCnt)
+         </p>
+         <p><tt>map.HsFlags</tt>                     % High Speed flags
+         </p>
+         <p><tt>map.HsSpeed</tt>                     % High Speed speed
+         </p>
+         <p><tt>map.HsState</tt>                     % High Speed state
+         </p>
+         <p><tt>map.HsSpeed</tt>                     % High Speed speed
+         </p>
+         <p><tt>map.UsbState</tt>                    % USB state
+         </p>
+         <h2>Examples<a name="31"></a></h2><pre class="codeinput">   map = MAP_GetCommModule();
+</pre><h2>See also<a name="32"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a></p>
+         <h2>Signature<a name="33"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/23
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_GetCommModule
+% Reads the IO map of the communication module
+%%
+%% Syntax
+% |map = MAP_GetCommModule()|
+%%
+%% Description
+% |map = MAP_GetCommModule()| returns the IO map of the communication module. The return
+% value |map| is a struct variable. It contains all communication module information.
+%%
+%%
+% *Output:*
+%%
+% |map.PFunc|              % ?
+%%
+% |map.PFuncTwo|           % ?
+%%
+% |map.BTPort|             % 1x4 cell array contains Bluetooth device information of each
+% NXT Bluetooth port (i = 0..3)
+%%
+% |map.BTPort{i}.BtDeviceTableName|            % name of the Bluetooth device
+%%
+% |map.BTPort{i}.BtDeviceTableClassOfDevice|   % class of the Bluetooth device
+%%
+% |map.BTPort{i}.BtDeviceTableBdAddr|          % MAC address of the Bluetooth device
+%%
+% |map.BTPort{i}.BtDeviceTableDeviceStatus|    % status of the Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTableName|           % name of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTableClassOfDevice|  % class of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTablePinCode|        % pin code of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnetTableBdAddr|          % MAC address of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTableHandleNr|       % handle nr of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTableStreamStatus|   % stream status of the connected Bluetooth device
+%%
+% |map.BTPort{i}.BtConnectTableLinkQuality|    % link quality of the connected Bluetooth device
+%%
+% |map.BrickDataName|               % name of the NXT brick
+%%
+% |map.BrickDataBluecoreVersion|    % Bluecore version number
+%%
+% |map.BrickDataBdAddr|             % MAC address of the NXT brick
+%%
+% |map.BrickDataBtStateStatus|      % Bluetooth state status
+%%
+% |map.BrickDataBtHwStatus|         % NXT hardware status
+%%
+% |map.BrickDataTimeOutValue|       % time out value
+%%
+% |map.BtDeviceCnt|                 % number of devices defined within the Bluetooth device table
+%%
+% |map.BtDeviceNameCnt|             % number of devices defined within the Bluetooth device table
+% (usually equal to BtDeviceCnt)
+%%
+% |map.HsFlags|                     % High Speed flags
+%%
+% |map.HsSpeed|                     % High Speed speed
+%%
+% |map.HsState|                     % High Speed state
+%%
+% |map.HsSpeed|                     % High Speed speed
+%%
+% |map.UsbState|                    % USB state
+%%
+%% Examples
+   map = MAP_GetCommModule();
+%%
+%% See also
+% NXT_ReadIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/23
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetMotor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetMotor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -79,5 +79,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetBrickName.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetBrickName.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetBrickName.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_SetBrickName</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_SetBrickName">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,18 +35,18 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>[NXT_SetBrickName(name)</tt></p>
-         <p><tt>NXT_SetBrickName(name, bt_handle)</tt></p>
+         <p><tt>NXT_SetBrickName(name, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_SetBrickName(name)</tt> sets a new <tt>name</tt> for the NXT Brick. The value <tt>name</tt> is a string value and determines the new name of the Brick.  The maximum length is limited to 15 characters.
          </p>
-         <p><tt>NXT_SetBrickName(name, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>NXT_SetBrickName(name, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_SetBrickName(<span class="string">'MyRobot'</span>);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   NXT_SetBrickName(<span class="string">'Mindy'</span>, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_SetBrickName(<span class="string">'Mindy'</span>, handle);
 </pre><h2>See also<a name="9"></a></h2>
-         <p><a href="BT_GetDefaultHandle.html">BT_GetDefaultHandle</a>, <a href="NXT_SendKeepAlive.html">NXT_SendKeepAlive</a>, <a href="NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></p>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a>, <a href="NXT_SendKeepAlive.html">NXT_SendKeepAlive</a>, <a href="NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></p>
          <h2>Signature<a name="10"></a></h2>
          <div>
@@ -56,5 +56,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -71,5 +71,5 @@
 % |[NXT_SetBrickName(name)|
 %%
-% |NXT_SetBrickName(name, bt_handle)|
+% |NXT_SetBrickName(name, handle)|
 %%
 %% Description
@@ -77,8 +77,8 @@
 % and determines the new name of the Brick.  The maximum length is limited to 15 characters.
 %%
-% |NXT_SetBrickName(name, bt_handle)| uses the given Bluetooth connection |handle|. This should be
-% a serial handle on a PC system and a file handle on a Linux system.
+% |NXT_SetBrickName(name, handle)| uses the given NXT connection |handle|. This should be
+% a struct containing a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -87,9 +87,9 @@
    NXT_SetBrickName('MyRobot');
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   NXT_SetBrickName('Mindy', bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_SetBrickName('Mindy', handle);
 %%
 %% See also
-% BT_GetDefaultHandle, NXT_SendKeepAlive, NXT_GetBatteryLevel
+% COM_GetDefaultNXT, NXT_SendKeepAlive, NXT_GetBatteryLevel
 %%
 %% Signature
@@ -97,5 +97,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetInputModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetInputModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetInputModule.html	(revision 254)
@@ -0,0 +1,150 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_GetInputModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_GetInputModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_GetInputModule</h1>
+         <introduction>
+            <p>Reads the IO map of the input module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#17">Examples</a></li>
+               <li><a href="#19">See also</a></li>
+               <li><a href="#20">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>map = MAP_GetInputModule(port)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>map = MAP_GetInputModule(port)</tt> returns the IO map of the input module at the given sensor <tt>port</tt>. The sensor <tt>port</tt> can be addressed by <tt>SENSOR_1</tt>, <tt>SENSOR_2</tt>, <tt>SENSOR_3</tt>, <tt>SENSOR_4</tt> and <tt>'all'</tt>. The return value <tt>map</tt> is a struct variable or cell array (<tt>'all'</tt> mode). It contains all input module information.
+         </p>
+         <p><b>Output:</b></p>
+         <p><tt>map.CustomZeroOffset</tt>   % custom sensor zero offset value of a sensor.
+         </p>
+         <p><tt>map.ADRaw</tt>              % raw 10-bit value last read from the ananlog to digital converter. Raw values produced by sensors typically
+            cover some subset of the full 10-bit range.
+         </p>
+         <p><tt>map.SensorRaw</tt>          % raw sensor value
+         </p>
+         <p><tt>map.SensorValue</tt>        % tacho/angle limit, 0 means none set
+         </p>
+         <p><tt>map.SensorType</tt>         % sensor value
+         </p>
+         <p><tt>map.SensorMode</tt>         % sensor mode
+         </p>
+         <p><tt>map.SensorBoolean</tt>      % boolean sensor value
+         </p>
+         <p><tt>map.DigiPinsDir</tt>        % digital pins direction value of a sensor
+         </p>
+         <p><tt>map.DigiPinsIn</tt>         % digital pins status value of a sensor ?
+         </p>
+         <p><tt>map.DigiPinsOut</tt>        % digital pins output level value of a sensor
+         </p>
+         <p><tt>map.CustomPctFullScale</tt> % custom sensor percent full scale value of the sensor.
+         </p>
+         <p><tt>map.CustomActiveStatus</tt> % custom sensor active status value of the sensor
+         </p>
+         <p><tt>map.InvalidData</tt>        % value of the InvalidData flag of the sensor
+         </p>
+         <h2>Examples<a name="17"></a></h2><pre class="codeinput">   map = MAP_GetInputModule(SENSOR_2);
+</pre><pre class="codeinput">   map = MAP_GetInputModule(<span class="string">'all'</span>);
+</pre><h2>See also<a name="19"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a></p>
+         <h2>Signature<a name="20"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/23
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_GetInputModule
+% Reads the IO map of the input module
+%%
+%% Syntax
+% |map = MAP_GetInputModule(port)|
+%%
+%% Description
+% |map = MAP_GetInputModule(port)| returns the IO map of the input module at the given sensor
+% |port|. The sensor |port| can be addressed by |SENSOR_1|, |SENSOR_2|, |SENSOR_3|, |SENSOR_4|
+% and |'all'|. The return value |map| is a struct variable or cell array (|'all'| mode).
+% It contains all input module information.
+%%
+%%
+% *Output:*
+%%
+% |map.CustomZeroOffset|   % custom sensor zero offset value of a sensor.
+%%
+% |map.ADRaw|              % raw 10-bit value last read from the ananlog to digital converter. Raw
+% values produced by sensors typically cover some subset of the
+% full 10-bit range.
+%%
+% |map.SensorRaw|          % raw sensor value
+%%
+% |map.SensorValue|        % tacho/angle limit, 0 means none set
+%%
+% |map.SensorType|         % sensor value
+%%
+% |map.SensorMode|         % sensor mode
+%%
+% |map.SensorBoolean|      % boolean sensor value
+%%
+% |map.DigiPinsDir|        % digital pins direction value of a sensor
+%%
+% |map.DigiPinsIn|         % digital pins status value of a sensor ?
+%%
+% |map.DigiPinsOut|        % digital pins output level value of a sensor
+%%
+% |map.CustomPctFullScale| % custom sensor percent full scale value of the sensor.
+%%
+% |map.CustomActiveStatus| % custom sensor active status value of the sensor
+%%
+% |map.InvalidData|        % value of the InvalidData flag of the sensor
+%%
+%%
+%% Examples
+   map = MAP_GetInputModule(SENSOR_2);
+%%
+   map = MAP_GetInputModule('all');
+%%
+%% See also
+% NXT_ReadIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/23
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_C.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_C.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_C.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>MOTOR_C</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_MOTOR_C">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetInputScaledValue.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetInputScaledValue.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetInputScaledValue.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_ResetInputScaledValue</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_ResetInputScaledValue">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,11 +35,11 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>NXT_ResetInputScaledValue(port)</tt></p>
-         <p><tt>NXT_ResetInputScaledValue(port, bt_handle)</tt></p>
+         <p><tt>NXT_ResetInputScaledValue(port, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_ResetInputScaledValue(port)</tt> resets the sensors <tt>ScaledVal</tt> back to <tt>0</tt> of the given sensor <tt>port</tt>. 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. The <tt>ScaledVal</tt> is set by function <tt>NXT_SetInputMode</tt>.
          </p>
-         <p><tt>NXT_ResetInputScaledValue(port, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>NXT_ResetInputScaledValue(port, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
@@ -47,6 +47,6 @@
          </p>
          <h2>Examples<a name="8"></a></h2><pre class="codeinput">   NXT_ResetInputScaledValue(SENSOR_2);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   NXT_ResetInputScaledValue(SENSOR_4, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_ResetInputScaledValue(SENSOR_4, handle);
 </pre><h2>See also<a name="10"></a></h2>
          <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="NXT_GetInputValues.html">NXT_GetInputValues</a></p>
@@ -58,5 +58,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -73,5 +73,5 @@
 % |NXT_ResetInputScaledValue(port)|
 %%
-% |NXT_ResetInputScaledValue(port, bt_handle)|
+% |NXT_ResetInputScaledValue(port, handle)|
 %%
 %% Description
@@ -81,8 +81,8 @@
 % function |NXT_SetInputMode|.
 %%
-% |NXT_ResetInputScaledValue(port, bt_handle)| uses the given Bluetooth connection |handle|. This should be a
-% serial handle on a PC system and a file handle on a Linux system.
+% |NXT_ResetInputScaledValue(port, handle)| uses the given NXT connection |handle|. This should be a
+% struct containing a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -96,6 +96,6 @@
    NXT_ResetInputScaledValue(SENSOR_2);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   NXT_ResetInputScaledValue(SENSOR_4, bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_ResetInputScaledValue(SENSOR_4, handle);
 %%
 %% See also
@@ -106,5 +106,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenUltrasonic.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenUltrasonic.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenUltrasonic.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>OpenUltrasonic</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_OpenUltrasonic">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -29,6 +29,6 @@
                <li><a href="#3">Description</a></li>
                <li><a href="#7">Examples</a></li>
-               <li><a href="#8">See also</a></li>
-               <li><a href="#9">Signature</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
             </ul>
          </div>
@@ -39,17 +39,26 @@
          <p><tt>OpenUltrasonic(port)</tt> initializes the input mode of NXT uktrasonic sensor specified by the sensor <tt>port</tt>. 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><tt>OpenUltrasonic(port, mode)</tt> can enable the snap shot mode if the value <tt>mode</tt> is equal to the string <tt>'snapshot'</tt>. This mode provides the snap shot mode (or SINGLE_SHOT mode) of the NXT ultrasonic sensor, which provides several sensor
-            readings in one step. However this mode is <b>not supported yet</b>.
+         <p><tt>OpenUltrasonic(port, mode)</tt> can enable the snapshot mode if the value <tt>mode</tt> is equal to the string <tt>'snapshot'</tt>. This mode provides the snap shot mode (or SINGLE_SHOT mode) of the NXT ultrasonic sensor, which provides several sensor
+            readings in one step. See <tt>USMakeSnapshot</tt> for more information.
          </p>
-         <p>Since the NXT ultrasonic sensor is a digital sensor (that uses the I&#65533;C protocol), the function <tt>NXT_SetInputMode</tt> cannot be used as for analog sensors.
+         <p>Since the NXT ultrasonic sensor is a digital sensor (that uses the I&sup2;C protocol), the function <tt>NXT_SetInputMode</tt> cannot be used as for analog sensors.
          </p>
-         <p>Note: The <tt>'snapshot'</tt> mode has not been implemented yet.
+         <p>Note: When the US sensor is opened in snapshot mode, the function <tt>GetUltrasonic</tt> does not work correctly!
          </p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   OpenUltrasonic(SENSOR_4);
    distance = GetUltrasonic(SENSOR_4);
    CloseSensor(SENSOR_4);
-</pre><h2>See also<a name="8"></a></h2>
-         <p><a href="GetUltrasonic.html">GetUltrasonic</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="9"></a></h2>
+</pre><pre class="codeinput">  port = SENSOR_4;
+  OpenUltrasonic(port, <span class="string">'snapshot'</span>);
+  <span class="comment">% send out the ping</span>
+  USMakeSnapshot(port);
+  <span class="comment">% wait some time for the sound to travel</span>
+  pause(0.1); <span class="comment">% 100ms is probably too much, calculate using c_sound ;-)</span>
+  <span class="comment">% retrieve all the echos in 1 step</span>
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="GetUltrasonic.html">GetUltrasonic</a>, <a href="USMakeSnapshot.html">USMakeSnapshot</a>, <a href="USGetSnapshotResults.html">USGetSnapshotResults</a>, <a href="CloseSensor.html">CloseSensor</a></p>
+         <h2>Signature<a name="10"></a></h2>
          <div>
             <ul>
@@ -58,5 +67,5 @@
                <li><b>Date:</b> 2008/01/08
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -80,12 +89,14 @@
 % |SENSOR_1| , |SENSOR_2|, |SENSOR_3| and |SENSOR_4| analog to the labeling on the NXT Brick.
 %%
-% |OpenUltrasonic(port, mode)| can enable the snap shot mode if the value |mode| is equal to the string
+% |OpenUltrasonic(port, mode)| can enable the snapshot mode if the value |mode| is equal to the string
 % |'snapshot'|. This mode provides the snap shot mode (or SINGLE_SHOT mode) of the NXT ultrasonic sensor,
-% which provides several sensor readings in one step. However this mode is *not supported yet*.
+% which provides several sensor readings in one step. See
+% |USMakeSnapshot| for more information.
 %%
-% Since the NXT ultrasonic sensor is a digital sensor (that uses the IÿC protocol),
+% Since the NXT ultrasonic sensor is a digital sensor (that uses the IÂ²C protocol),
 % the function |NXT_SetInputMode| cannot be used as for analog sensors.
 %%
-% Note: The |'snapshot'| mode has not been implemented yet.
+% Note: When the US sensor is opened in snapshot mode, the function
+% |GetUltrasonic| does not work correctly!
 %%
 %%
@@ -95,6 +106,16 @@
    CloseSensor(SENSOR_4);
 %%
+  port = SENSOR_4;
+  OpenUltrasonic(port, 'snapshot');
+  % send out the ping
+  USMakeSnapshot(port);
+  % wait some time for the sound to travel
+  pause(0.1); % 100ms is probably too much, calculate using c_sound ;-)
+  % retrieve all the echos in 1 step
+  echos = USGetSnapshotResults(port);
+  CloseSensor(SENSOR_4);
+%%
 %% See also
-% GetUltrasonic, CloseSensor, SENSOR_1, SENSOR_2, SENSOR_3, SENSOR_4
+% GetUltrasonic, USMakeSnapshot, USGetSnapshotResults, CloseSensor
 %%
 %% Signature
@@ -102,5 +123,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2008/01/08
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetOutputState.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetOutputState.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetOutputState.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_SetOutputState</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_SetOutputState">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          </p>
          <p><tt>status = NXT_SetOutputState(OutputPort, Power, IsMotorOn, IsBrake, RegModeName, TurnRatio, RunStateName, TachoLimit, ReplyMode,
-               bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+               handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
          <h2>Example<a name="5"></a></h2><pre class="codeinput">   NXT_SetOutputState(MOTOR_A,80,1,1,<span class="string">'SPEED'</span>,0,<span class="string">'RUNNING'</span>,360,<span class="string">'dontreply'</span>);
@@ -53,5 +53,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -81,5 +81,5 @@
 %%
 % |status = NXT_SetOutputState(OutputPort, Power, IsMotorOn, IsBrake, RegModeName, TurnRatio,
-% RunStateName, TachoLimit, ReplyMode, bt_handle)| uses the given Bluetooth connection |handle|.
+% RunStateName, TachoLimit, ReplyMode, handle)| uses the given NXT connection |handle|.
 % This should be a serial handle on a PC system and a file handle on a Linux system.
 %%
@@ -94,5 +94,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetPower.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetPower.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetPower.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SetPower</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetPower">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -87,5 +87,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_WriteIOMap.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_WriteIOMap.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_WriteIOMap.html	(revision 254)
@@ -0,0 +1,110 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>NXT_WriteIOMap</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_NXT_WriteIOMap">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>NXT_WriteIOMap</h1>
+         <introduction>
+            <p>Writes the IO map to the given module ID</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#7">Examples</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>NXT_WriteIOMap(mod_id, offset, n_bytes, data)</tt></p>
+         <p><tt>NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>NXT_WriteIOMap(mod_id, offset, n_bytes, data)</tt> write the data <tt>bytes</tt> to the given module ID (<tt>mod_id</tt>). The total number of bytes is given by <tt>n_bytes</tt>. The <tt>offset</tt> parameter determines the index position of the first byte.
+         </p>
+         <p><tt>NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle)</tt> sends the IO map write command over the specific NXT handle <tt>handle</tt> (e.g. serial handle (PC) / file handle (Linux)).
+         </p>
+         <p>If no NXT <tt>handle</tt> is specified the default one (<tt>COM_GetDefaultNXT)</tt> is used.
+         </p>
+         <p>For more details see the official LEGO Mindstorms communication protocol.</p>
+         <h2>Examples<a name="7"></a></h2><pre class="codeinput">   OutputModuleID = 131073
+   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes;
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   OutputModuleID = 131073
+   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes, handle);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% NXT_WriteIOMap
+% Writes the IO map to the given module ID
+%%
+%% Syntax
+% |NXT_WriteIOMap(mod_id, offset, n_bytes, data)|
+%%
+% |NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle)|
+%%
+%% Description
+% |NXT_WriteIOMap(mod_id, offset, n_bytes, data)| write the data |bytes| to the given module ID (|mod_id|).
+% The total number of bytes is given by |n_bytes|. The |offset| parameter determines the index
+% position of the first byte.
+%%
+% |NXT_WriteIOMap(mod_id, offset, n_bytes, data, handle)| sends the IO map write command
+% over the specific NXT handle |handle| (e.g. serial handle (PC) / file handle (Linux)).
+%%
+% If no NXT |handle| is specified the default one (|COM_GetDefaultNXT)| is used.
+%%
+% For more details see the official LEGO Mindstorms communication protocol.
+%%
+%% Examples
+   OutputModuleID = 131073
+   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes;
+%%
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   OutputModuleID = 131073
+   NXT_WriteIOMap(OutputModuleID, 0, 30, bytes, handle);
+%%
+%% See also
+% NXT_ReadIOMap, COM_GetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMotor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMotor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetMotor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SetMotor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetMotor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -53,5 +53,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -89,5 +89,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/tictic.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/tictic.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/tictic.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>tictic</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_tictic">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -55,5 +55,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -94,5 +94,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SendPacket.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SendPacket.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_SendPacket.html	(revision 254)
@@ -0,0 +1,114 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_SendPacket</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_SendPacket">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_SendPacket</h1>
+         <introduction>
+            <p>Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#4">Example</a></li>
+               <li><a href="#5">See also</a></li>
+               <li><a href="#6">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>COM_SendPacket(Packet, handle)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>COM_SendPacket(Packet, handle)</tt> sends the given byte-array <tt>Packet</tt> (column vector), (which can easily be created by the function <tt>COM_CreatePacket</tt>) over the USB or Bluetooth channel specified by the given <tt>handle</tt> (struct) created by the function <tt>COM_OpenNXT</tt> or <tt>COM_OpenNXTEx</tt>, or obtained from <tt>COM_GetDefaultNXT</tt>.
+         </p>
+         <p>Note In the case of a Bluetooth connection this function uses the specific settings from the ini-file that was specified when
+            opening the handle. Parameters used here are <tt>SendSendPause</tt> and <tt>SendReceivePause</tt>, which will cause this function to wait a certain amount of milliseconds between each consecutive send or receive operation
+            to avoid packet loss or buffer overflows inside the blutooth stack.
+         </p>
+         <h2>Example<a name="4"></a></h2><pre class="codeinput">   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+
+   [type cmd] = name2commandbytes(<span class="string">'KEEPALIVE'</span>);
+   content = [];  <span class="comment">% no payload in NXT command KEEPALIVE</span>
+   packet = COM_CreatePacket(type, cmd, <span class="string">'dontreply'</span>, content);
+
+   COM_SendPacket(packet, bt_handle);
+</pre><h2>See also<a name="5"></a></h2>
+         <p><a href="COM_CreatePacket.html">COM_CreatePacket</a>, <a href="COM_CollectPacket.html">COM_CollectPacket</a>, <a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a>, <a href="COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a></p>
+         <h2>Signature<a name="6"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/09
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_SendPacket
+% Sends a communication protocol packet (byte-array) via a USB or Bluetooth channel (serial port)
+%%
+%% Syntax
+% |COM_SendPacket(Packet, handle)|
+%%
+%% Description
+% |COM_SendPacket(Packet, handle)| sends the given byte-array |Packet| (column vector),
+% (which can easily be created by the function |COM_CreatePacket|) over the USB or Bluetooth
+% channel specified by the given |handle| (struct) created by the function |COM_OpenNXT| or
+% |COM_OpenNXTEx|, or obtained from |COM_GetDefaultNXT|.
+%%
+% Note
+% In the case of a Bluetooth connection this function uses the specific settings from the
+% ini-file that was specified when opening the handle. Parameters used here are
+% |SendSendPause| and |SendReceivePause|, which will cause this function to wait a certain
+% amount of milliseconds between each consecutive send or receive operation to avoid packet
+% loss or buffer overflows inside the blutooth stack.
+%%
+%% Example
+   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT('bluetooth.ini', 'check');
+
+   [type cmd] = name2commandbytes('KEEPALIVE');
+   content = [];  % no payload in NXT command KEEPALIVE
+   packet = COM_CreatePacket(type, cmd, 'dontreply', content);
+
+   COM_SendPacket(packet, bt_handle);
+%%
+%% See also
+% COM_CreatePacket, COM_CollectPacket, COM_OpenNXT, COM_GetDefaultNXT, COM_MakeBTConfigFile
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/09
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotorSettings.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotorSettings.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetMotorSettings.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetMotorSettings</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetMotorSettings">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -74,5 +74,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -134,5 +134,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXTEx.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXTEx.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXTEx.html	(revision 254)
@@ -0,0 +1,184 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_OpenNXTEx</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_OpenNXTEx">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_OpenNXTEx</h1>
+         <introduction>
+            <p>Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#4">Description</a></li>
+               <li><a href="#12">Limitations of |COM_CloseNXT|</a></li>
+               <li><a href="#13">Example</a></li>
+               <li><a href="#14">See also</a></li>
+               <li><a href="#15">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>handle = COM_OpenNXTEx('USB', UseThisNXTMAC)</tt></p>
+         <p><tt>handle = COM_OpenNXTEx('Bluetooth', UseThisNXTMAC, inifilename, 'check')</tt></p>
+         <p><tt>handle = COM_OpenNXTEx('Any', UseThisNXTMAC, inifilename, 'check')</tt></p>
+         <h2>Description<a name="4"></a></h2>
+         <p>This function establishes a connection to an NXT brick and returns the handle structure that has to be used with NXT-functions
+            (you can call <tt>COM_SetDefaultNXT(handle)</tt> afterwards for easier use).
+         </p>
+         <p>For a more convenient way to open an NXT handle with less parameters, the function <tt>COM_OpenNXT</tt> is provided.
+         </p>
+         <p>Different types of connection modes are supported. In all modes, you can set <tt>UseThisNXTMAC</tt> to a string with the NXT's MAC address (serial number). A connection will then only be estabslished to a matching NXT brick.
+            This can be useful for programs with multiple NXT devices. Set it to an empty string <tt>''</tt> to use any NXT available (usually the first one found).
+         </p>
+         <p><tt>handle = COM_OpenNXTEx('USB', UseThisNXTMAC)</tt> This will try to open a connection via USB. Device drivers (Fantom on Windows, libusb on Linux) have to be installed.
+         </p>
+         <p><tt>handle = COM_OpenNXTEx('Bluetooth', UseThisNXTMAC, inifilename, 'check')</tt> Uses Bluetooth as communication method. A valid inifile containing parameters like the COM-Port has to be specified in <tt>inifilename</tt>. The optional paramter <tt>'check'</tt> can be omitted (it will nake sure that the new Bluetooth connection is working bi-directional). Leave it out if your hardware
+            does only support sending data (depends on the Bluetooth hardware, drivers and stack used). In this case you will not be able
+            to receive any data from the brick, but can still send commands (like e.g. motor control). To create an inifile with Bluetooth
+            settings, the function <tt>COM_MakeBTConfigFile</tt> is available.
+         </p>
+         <p>Note that as of right now, the parameter <tt>UseThisNXTMAC</tt> will be ignored for Bluetooth connections until implemented in a future version.
+         </p>
+         <p><tt>handle = COM_OpenNXTEx('Any', UseThisNXTMAC, inifilename, 'check')</tt> This syntax combines the two parameter settings from above. <tt>inifilename</tt> has to be given, the optional <tt>'check'</tt> can be omitted. The function will try to locate an NXT device on the USB bus first. If this fails for some reason (no USB
+            connection to the NXT available, no device drivers installed, or NXT device is busy), the function will silently try to establish
+            a connection via Bluetooth.
+         </p>
+         <p>The advantage is that this version works with both Bluetooth and USB connections <i>without changing</i> any code. Plug or unplug the USB cable to switch between connection types...
+         </p>
+         <h2>Limitations of |COM_CloseNXT|<a name="12"></a></h2>
+         <p>If you call <tt>COM_CloseNXT('all')</tt> after a <tt>clear all</tt> command has been issued, the function will not be able to close all remaining open USB handles, since they have been cleared
+            out of memory. This is a problem on Linux systems. You will not be able to use the NXT device without rebooting it. Solution:
+            Either use only <tt>clear</tt> in your programs, or you use the <tt>COM_CloseNXT('all')</tt> statement before <tt>clear all</tt>. The best way however is to track your handles carefully and close them manually (<tt>COM_CloseNXT(handle)</tt>) before exiting whenever possible!%
+         </p>
+         <h2>Example<a name="13"></a></h2><pre class="codeinput">   myNXT = COM_OpenNXTEx(<span class="string">'Any'</span>, <span class="string">'001612345678'</span>, <span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+   <span class="comment">% This will connect to an NXT device with the MAC/serial number 001612345678,</span>
+   <span class="comment">% first trying via USB. If this fails (no drivers installed or no matching USB</span>
+   <span class="comment">% device found), a connection via Bluetooth will be established, using</span>
+   <span class="comment">% the paramters found in the given config file.</span>
+</pre><h2>See also<a name="14"></a></h2>
+         <p><a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_CloseNXT.html">COM_CloseNXT</a>, <a href="COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a>, <a href="COM_SetDefaultNXT.html">COM_SetDefaultNXT</a></p>
+         <h2>Signature<a name="15"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/06/11
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_OpenNXTEx
+% Opens a Bluetooth or USB connection to an NXT device and returns a handle for future use
+%%
+%% Syntax
+% |handle = COM_OpenNXTEx('USB', UseThisNXTMAC)|
+%%
+% |handle = COM_OpenNXTEx('Bluetooth', UseThisNXTMAC, inifilename, 'check')|
+%%
+% |handle = COM_OpenNXTEx('Any', UseThisNXTMAC, inifilename, 'check')|
+%%
+%% Description
+% This function establishes a connection to an NXT brick and returns the
+% handle structure that has to be used with NXT-functions (you can call
+% |COM_SetDefaultNXT(handle)| afterwards for easier use).
+%%
+% For a more convenient way to open an NXT handle with less parameters, the
+% function |COM_OpenNXT| is provided.
+%%
+% Different types of connection modes are supported. In all modes, you can
+% set |UseThisNXTMAC| to a string with the NXT's MAC address (serial number).
+% A connection will then only be estabslished to a matching NXT brick. This can be
+% useful for programs with multiple NXT devices. Set it to an empty string
+% |''| to use any NXT available (usually the first one found).
+%%
+%%
+% |handle = COM_OpenNXTEx('USB', UseThisNXTMAC)|
+% This will try to open a connection via USB. Device drivers (Fantom on
+% Windows, libusb on Linux) have to be installed.
+%%
+%%
+% |handle = COM_OpenNXTEx('Bluetooth', UseThisNXTMAC, inifilename, 'check')|
+% Uses Bluetooth as communication method. A valid inifile containing
+% parameters like the COM-Port has to be specified in |inifilename|. The
+% optional paramter |'check'| can be omitted (it will nake sure that the
+% new Bluetooth connection is working bi-directional). Leave it out if
+% your hardware does only support sending data (depends on the Bluetooth
+% hardware, drivers and stack used). In this case you will not be able to
+% receive any data from the brick, but can still send commands (like e.g.
+% motor control).
+% To create an inifile with Bluetooth settings, the function
+% |COM_MakeBTConfigFile| is available.
+%%
+% Note that as of right now, the parameter |UseThisNXTMAC| will be
+% ignored for Bluetooth connections until implemented in a future version.
+%%
+%%
+% |handle = COM_OpenNXTEx('Any', UseThisNXTMAC, inifilename, 'check')|
+% This syntax combines the two parameter settings from above.
+% |inifilename| has to be given, the optional |'check'| can be omitted.
+% The function will try to locate an NXT device on the USB bus first. If
+% this fails for some reason (no USB connection to the NXT available, no
+% device drivers installed, or NXT device is busy), the function will
+% silently try to establish a connection via Bluetooth.
+%%
+% The advantage is that this version works with both Bluetooth and USB
+% connections _without changing_ any code. Plug or unplug the USB cable
+% to switch between connection types...
+%%
+%%
+%% Limitations of |COM_CloseNXT|
+% If you call |COM_CloseNXT('all')| after a |clear all| command has been
+% issued, the function will not be able to close all remaining open USB
+% handles, since they have been cleared out of memory. This is a problem
+% on Linux systems. You will not be able to use the NXT device without
+% rebooting it.
+% Solution: Either use only |clear| in your programs, or you use the
+% |COM_CloseNXT('all')| statement before |clear all|.
+% The best way however is to track your handles carefully and close them
+% manually (|COM_CloseNXT(handle)|) before exiting whenever possible!%
+%%
+%%
+%% Example
+   myNXT = COM_OpenNXTEx('Any', '001612345678', 'bluetooth.ini', 'check');
+   % This will connect to an NXT device with the MAC/serial number 001612345678,
+   % first trying via USB. If this fails (no drivers installed or no matching USB
+   % device found), a connection via Bluetooth will be established, using
+   % the paramters found in the given config file.
+%%
+%%
+%% See also
+% COM_OpenNXT, COM_CloseNXT, COM_MakeBTConfigFile, COM_SetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/06/11
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSound.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSound.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSound.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetSound</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetSound">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -53,5 +53,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -90,5 +90,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXT.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXT.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_OpenNXT.html	(revision 254)
@@ -0,0 +1,139 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_OpenNXT</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_OpenNXT">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_OpenNXT</h1>
+         <introduction>
+            <p>Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#6">Limitations of |COM_CloseNXT|</a></li>
+               <li><a href="#7">Example</a></li>
+               <li><a href="#8">See also</a></li>
+               <li><a href="#9">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>handle = COM_OpenNXT()</tt></p>
+         <p><tt>handle = COM_OpenNXT(inifilename, 'check')</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>handle = COM_OpenNXT()</tt> tries to open a connection via USB. The first NXT device that is found will be used. Device drivers (Fantom on Windows, libusb
+            on Linux) have to be already installed for USB to work.
+         </p>
+         <p><tt>handle = COM_OpenNXT(inifilename, 'check')</tt> will search the USB bus for NXT devices, just as the syntax without any parameters. If this fails for some reason (no USB
+            connection to the NXT available, no device drivers installed, or NXT device is busy), the function will try to establish a
+            connection via Bluetooth, using the given Bluetooth configuration file (you can create one easily with <tt>COM_MakeBTConfigFile</tt>. The optional paramter <tt>'check'</tt> can be omitted, but that is not recommended (as it detects errors with the Bluetooth connection outside MATLAB right away).
+            For more information about this <tt>'check'</tt>-option, see the documentation on <tt>NXT_CloseNXTEx</tt>.
+         </p>
+         <p>Note that this function is the most simple way to get an NXT handle. If you need a method to access multiple NXTs or more
+            options, see the advanced function <tt>COM_OpenNXTEx</tt>. In fact, <tt>COM_OpenNXT</tt> is just a convenient wrapper to <tt>COM_OpenNXTEx('Any', ...)</tt>.
+         </p>
+         <h2>Limitations of |COM_CloseNXT|<a name="6"></a></h2>
+         <p>If you call <tt>COM_CloseNXT('all')</tt> after a <tt>clear all</tt> command has been issued, the function will not be able to close all remaining open USB handles, since they have been cleared
+            out of memory. This is a problem on Linux systems. You will not be able to use the NXT device without rebooting it. Solution:
+            Either use only <tt>clear</tt> in your programs, or you use the <tt>COM_CloseNXT('all')</tt> statement before <tt>clear all</tt>. The best way however is to track your handles carefully and close them manually (<tt>COM_CloseNXT(handle)</tt>) before exiting whenever possible!
+         </p>
+         <h2>Example<a name="7"></a></h2><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, check');
+   COM_SetDefaultNXT(handle);
+   NXT_PlayTone(440,10);
+   COM_CloseNXT(handle);
+</pre><h2>See also<a name="8"></a></h2>
+         <p><a href="COM_OpenNXTEx.html">COM_OpenNXTEx</a>, <a href="COM_CloseNXT.html">COM_CloseNXT</a>, <a href="COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a>, <a href="COM_SetDefaultNXT.html">COM_SetDefaultNXT</a></p>
+         <h2>Signature<a name="9"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/09
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_OpenNXT
+% Opens a USB or Bluetooth connection to an NXT device and returns a handle for future use
+%%
+%% Syntax
+% |handle = COM_OpenNXT()|
+%%
+% |handle = COM_OpenNXT(inifilename, 'check')|
+%%
+%% Description
+% |handle = COM_OpenNXT()| tries to open a connection via USB. The first
+% NXT device that is found will be used. Device drivers (Fantom on
+% Windows, libusb on Linux) have to be already installed for USB to work.
+%%
+% |handle = COM_OpenNXT(inifilename, 'check')| will search the USB bus
+% for NXT devices, just as the syntax without any parameters. If this fails
+% for some reason (no USB connection to the NXT available, no device drivers
+% installed, or NXT device is busy), the function will try to establish a
+% connection via Bluetooth, using the given Bluetooth configuration file
+% (you can create one easily with |COM_MakeBTConfigFile|. The optional
+% paramter |'check'| can be omitted, but that is not recommended (as it detects errors with the
+% Bluetooth connection outside MATLAB right away). For more information
+% about this |'check'|-option, see the documentation on |NXT_CloseNXTEx|.
+%%
+%%
+% Note that this function is the most simple way to get an NXT handle. If
+% you need a method to access multiple NXTs or more options, see the
+% advanced function |COM_OpenNXTEx|. In fact, |COM_OpenNXT| is just a
+% convenient wrapper to |COM_OpenNXTEx('Any', ...)|.
+%%
+%%
+%% Limitations of |COM_CloseNXT|
+% If you call |COM_CloseNXT('all')| after a |clear all| command has been
+% issued, the function will not be able to close all remaining open USB
+% handles, since they have been cleared out of memory. This is a problem
+% on Linux systems. You will not be able to use the NXT device without
+% rebooting it.
+% Solution: Either use only |clear| in your programs, or you use the
+% |COM_CloseNXT('all')| statement before |clear all|.
+% The best way however is to track your handles carefully and close them
+% manually (|COM_CloseNXT(handle)|) before exiting whenever possible!
+%%
+%%
+%% Example
+   handle = COM_OpenNXT('bluetooth.ini', check');
+   COM_SetDefaultNXT(handle);
+   NXT_PlayTone(440,10);
+   COM_CloseNXT(handle);
+%%
+%% See also
+% COM_OpenNXTEx, COM_CloseNXT, COM_MakeBTConfigFile, COM_SetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/09
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_1.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_1.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_1.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SENSOR_1</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SENSOR_1">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SpeedRegulation.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SpeedRegulation.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SpeedRegulation.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SpeedRegulation</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SpeedRegulation">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -57,5 +57,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -101,5 +101,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetSoundModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetSoundModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetSoundModule.html	(revision 254)
@@ -0,0 +1,129 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_GetSoundModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_GetSoundModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_GetSoundModule</h1>
+         <introduction>
+            <p>Reads the IO map of the sound module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#12">Examples</a></li>
+               <li><a href="#13">See also</a></li>
+               <li><a href="#14">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>map = MAP_GetSoundModule()</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>map = MAP_GetSoundModule()</tt> returns the IO map of the sound module. The return value <tt>map</tt> is a struct variable. It contains all sound module information.
+         </p>
+         <p><b>Output:</b></p>
+         <p><tt>map.Frequency</tt>          % frequency of the last played ton in Hz
+         </p>
+         <p><tt>map.Duration</tt>           % duration of the last played ton in ms
+         </p>
+         <p><tt>map.SamplingRate</tt>       % current sound sample rate
+         </p>
+         <p><tt>map.SoundFileName</tt>      % sound file name of the last played sound file
+         </p>
+         <p><tt>map.Flags</tt>              % sound module flag, 'IDLE': sound module is idle, 'UPDATE': a request for plackback is pending, 'RUNNING':
+            playback in progress.
+         </p>
+         <p><tt>map.State</tt>              % sound module state, 'IDLE'; sound module is idel, 'PLAYING_FILE': sound module is playing a .rso file, 'PLAYING_TONE':
+            a tone is playing, 'STOP': a request to stop playback is in progress.
+         </p>
+         <p><tt>map.Mode</tt>               % sound module mode, 'ONCE': only play file once , 'LOOP': play file in a loop, 'TONE': play tone.
+         </p>
+         <p><tt>map.Volume</tt>             % volume: 0: diabled, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+         </p>
+         <h2>Examples<a name="12"></a></h2><pre class="codeinput">   map = MAP_GetSoundModule();
+</pre><h2>See also<a name="13"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a></p>
+         <h2>Signature<a name="14"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_GetSoundModule
+% Reads the IO map of the sound module
+%%
+%% Syntax
+% |map = MAP_GetSoundModule()|
+%%
+%% Description
+% |map = MAP_GetSoundModule()| returns the IO map of the sound module. The return value |map| is
+% a struct variable. It contains all sound module information.
+%%
+%%
+% *Output:*
+%%
+% |map.Frequency|          % frequency of the last played ton in Hz
+%%
+% |map.Duration|           % duration of the last played ton in ms
+%%
+% |map.SamplingRate|       % current sound sample rate
+%%
+% |map.SoundFileName|      % sound file name of the last played sound file
+%%
+% |map.Flags|              % sound module flag, 'IDLE': sound module is idle, 'UPDATE': a
+% request for plackback is pending, 'RUNNING': playback in
+% progress.
+%%
+% |map.State|              % sound module state, 'IDLE'; sound module is idel,
+% 'PLAYING_FILE': sound module is playing a .rso file,
+% 'PLAYING_TONE': a tone is playing, 'STOP': a request to stop
+% playback is in progress.
+%%
+% |map.Mode|               % sound module mode, 'ONCE': only play file once , 'LOOP': play
+% file in a loop, 'TONE': play tone.
+%%
+% |map.Volume|             % volume: 0: diabled, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+%%
+%% Examples
+   map = MAP_GetSoundModule();
+%%
+%% See also
+% NXT_ReadIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetBatteryLevel.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetBatteryLevel.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetBatteryLevel.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_GetBatteryLevel</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_GetBatteryLevel">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,11 +41,11 @@
          <p><tt>voltage = NXT_GetBatteryLevel(handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <h2>Examples<a name="6"></a></h2><pre class="codeinput">   voltage = NXT_GetBatteryLevel();
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   voltage = NXT_GetBatteryLevel(bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   voltage = NXT_GetBatteryLevel(handle);
 </pre><h2>See also<a name="8"></a></h2>
-         <p><a href="BT_GetDefaultHandle.html">BT_GetDefaultHandle</a>, <a href="NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></p>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a>, <a href="NXT_SendKeepAlive.html">NXT_SendKeepAlive</a></p>
          <h2>Signature<a name="9"></a></h2>
          <div>
@@ -55,5 +55,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -79,14 +79,14 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %% Examples
    voltage = NXT_GetBatteryLevel();
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   voltage = NXT_GetBatteryLevel(bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   voltage = NXT_GetBatteryLevel(handle);
 %%
 %% See also
-% BT_GetDefaultHandle, NXT_SendKeepAlive
+% COM_GetDefaultNXT, NXT_SendKeepAlive
 %%
 %% Signature
@@ -94,5 +94,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CloseNXT.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CloseNXT.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CloseNXT.html	(revision 254)
@@ -0,0 +1,156 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_CloseNXT</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_CloseNXT">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_CloseNXT</h1>
+         <introduction>
+            <p>Closes and deletes a specific NXT handle, or clears all existing handles</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#4">Description</a></li>
+               <li><a href="#8">Limitations</a></li>
+               <li><a href="#9">Example</a></li>
+               <li><a href="#10">See also</a></li>
+               <li><a href="#11">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>COM_CloseNXT(handle)</tt></p>
+         <p><tt>COM_CloseNXT('all')</tt></p>
+         <p><tt>COM_CloseNXT('all', inifilename)</tt></p>
+         <h2>Description<a name="4"></a></h2>
+         <p>After using NXT handles, a user should free the device (and the memory occupied by the handle) by calling this method. After
+            the clean up invoked by this call, an NXT brick can be accessed and used again (by <tt>COM_OpenNXT</tt> or <tt>COM_OpenNXTEx</tt>.
+         </p>
+         <p><tt>COM_CloseNXT(handle)</tt> will close and erase the specified device. <tt>handle</tt> has to be a valid handle struct created by either <tt>COM_OpenNXT</tt> or <tt>COM_OpenNXTEx</tt>.
+         </p>
+         <p><tt>COM_CloseNXT('all')</tt> will close and erase all existing NXT devices from memory (as long as the toolbox could keep track of them). All USB handles
+            will be destroyed, all open serial ports (for Bluetooth connections) will be closed. This can be useful at the beginning of
+            a program to create a "fresh start" and a well-defined starting environment. Please note that a <tt>clear all</tt> command can cause this function to fail (in such a way, that not all open USB devices can be closed, since all information
+            about them has be cleare from MATLAB's memory). If this happens, an NXT device might appear to be busy and cannot be used.
+            Usually rebooting the NXT helps, if not try to restart MATLAB as well. So be careful with using <tt>clear all</tt> before |COM_CloseNXT('all').
+         </p>
+         <p><tt>COM_CloseNXT('all', inifilename)</tt> will do the same as above, but instead of closing all open serial ports, only the COM-Port specified in <tt>inifilename</tt> will be used (a valid Bluetooth configuration file can be created by the function <tt>COM_MakeBTConfigFile</tt>). This syntax helps to avoid interference with other serial ports that might be used by other (MATLAB) programs at the same
+            time. Note that still all open USB devices will be closed.
+         </p>
+         <h2>Limitations<a name="8"></a></h2>
+         <p>If you call <tt>COM_CloseNXT('all')</tt> after a <tt>clear all</tt> command has been issued, the function will not be able to close all remaining open USB handles, since they have been cleared
+            out of memory. This is a problem on Linux systems. You will not be able to use the NXT device without rebooting it. Solution:
+            Either use only <tt>clear</tt> in your programs, or you use the <tt>COM_CloseNXT('all')</tt> statement before <tt>clear all</tt>. The best way however is to track your handles carefully and close them manually before exiting whenever possible!
+         </p>
+         <h2>Example<a name="9"></a></h2><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, check');
+   COM_SetDefaultNXT(handle);
+   NXT_PlayTone(440,10);
+   COM_CloseNXT(handle);
+</pre><h2>See also<a name="10"></a></h2>
+         <p><a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_OpenNXTEx.html">COM_OpenNXTEx</a>, <a href="COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a>, <a href="COM_SetDefaultNXT.html">COM_SetDefaultNXT</a></p>
+         <h2>Signature<a name="11"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/07/09
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_CloseNXT
+% Closes and deletes a specific NXT handle, or clears all existing handles
+%%
+%% Syntax
+% |COM_CloseNXT(handle)|
+%%
+% |COM_CloseNXT('all')|
+%%
+% |COM_CloseNXT('all', inifilename)|
+%%
+%%
+%% Description
+% After using NXT handles, a user should free the device (and the memory
+% occupied by the handle) by calling this method. After the clean up
+% invoked by this call, an NXT brick can be accessed and used again (by
+% |COM_OpenNXT| or |COM_OpenNXTEx|.
+%%
+% |COM_CloseNXT(handle)| will close and erase the specified device.
+% |handle| has to be a valid handle struct created by either
+% |COM_OpenNXT| or |COM_OpenNXTEx|.
+%%
+% |COM_CloseNXT('all')| will close and erase all existing NXT devices
+% from memory (as long as the toolbox could keep track of them). All USB
+% handles will be destroyed, all open serial ports (for Bluetooth
+% connections) will be closed. This can be useful at the beginning of a
+% program to create a "fresh start" and a well-defined starting
+% environment.
+% Please note that a |clear all| command can cause this function to fail
+% (in such a way, that not all open USB devices can be closed, since all
+% information about them has be cleare from MATLAB's memory). If this
+% happens, an NXT device might appear to be busy and cannot be used.
+% Usually rebooting the NXT helps, if not try to restart MATLAB as well.
+% So be careful with using |clear all| before |COM_CloseNXT('all').
+%%
+% |COM_CloseNXT('all', inifilename)| will do the same as above, but
+% instead of closing all open serial ports, only the COM-Port specified
+% in |inifilename| will be used (a valid Bluetooth configuration file can be
+% created by the function |COM_MakeBTConfigFile|).
+% This syntax helps to avoid interference with other serial ports that might
+% be used by other (MATLAB) programs at the same time. Note that still all open
+% USB devices will be closed.
+%%
+%%
+%% Limitations
+% If you call |COM_CloseNXT('all')| after a |clear all| command has been
+% issued, the function will not be able to close all remaining open USB
+% handles, since they have been cleared out of memory. This is a problem
+% on Linux systems. You will not be able to use the NXT device without
+% rebooting it.
+% Solution: Either use only |clear| in your programs, or you use the
+% |COM_CloseNXT('all')| statement before |clear all|.
+% The best way however is to track your handles carefully and close them
+% manually before exiting whenever possible!
+%%
+%%
+%% Example
+   handle = COM_OpenNXT('bluetooth.ini', check');
+   COM_SetDefaultNXT(handle);
+   NXT_PlayTone(440,10);
+   COM_CloseNXT(handle);
+%%
+%% See also
+% COM_OpenNXT, COM_OpenNXTEx, COM_MakeBTConfigFile, COM_SetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2008/07/09
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopSoundPlayback.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopSoundPlayback.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_StopSoundPlayback.html	(revision 254)
@@ -0,0 +1,104 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>NXT_StopSoundPlayback</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_NXT_StopSoundPlayback">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>NXT_StopSoundPlayback</h1>
+         <introduction>
+            <p>Stops the current sound playback</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#7">Examples</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>NXT_StopSoundPlayback()</tt></p>
+         <p><tt>NXT_StopSoundPlayback(handle)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>NXT_StopSoundPlayback()</tt> stops the current sound playback.
+         </p>
+         <p><tt>NXT_StopSoundPlayback(handle)</tt> sends the stop sound playback command over the specific Bluetooth <tt>handle</tt> (serial handle (PC) / file handle (Linux)).
+         </p>
+         <p>If no NXT <tt>handle</tt> is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
+         </p>
+         <p>For more details see the official LEGO Mindstorms communication protocol.</p>
+         <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_StopSoundPlayback();
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_StopSoundPlayback(handle);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="NXT_PlaySoundFile.html">NXT_PlaySoundFile</a>, <a href="NXT_PlayTone.html">NXT_PlayTone</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% NXT_StopSoundPlayback
+% Stops the current sound playback
+%%
+%% Syntax
+% |NXT_StopSoundPlayback()|
+%%
+% |NXT_StopSoundPlayback(handle)|
+%%
+%% Description
+% |NXT_StopSoundPlayback()| stops the current sound playback.
+%%
+% |NXT_StopSoundPlayback(handle)| sends the stop sound playback command over the specific
+% Bluetooth |handle| (serial handle (PC) / file handle (Linux)).
+%%
+% If no NXT |handle| is specified the default one (|COM_GetDefaultNXT|) is used.
+%%
+% For more details see the official LEGO Mindstorms communication protocol.
+%%
+%% Examples
+   NXT_StopSoundPlayback();
+%%
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_StopSoundPlayback(handle);
+%%
+%% See also
+% NXT_PlaySoundFile, NXT_PlayTone, COM_GetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/CloseSensor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/CloseSensor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/CloseSensor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>CloseSensor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_CloseSensor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -51,5 +51,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -86,5 +86,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetAngleLimit.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetAngleLimit.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetAngleLimit.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SetAngleLimit</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetAngleLimit">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -57,5 +57,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -99,5 +99,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSwitch.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSwitch.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/GetSwitch.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>GetSwitch</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_GetSwitch">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -89,5 +89,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetTurnRatio.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetTurnRatio.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SetTurnRatio.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SetTurnRatio</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SetTurnRatio">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -62,5 +62,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -115,5 +115,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetOutputModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetOutputModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetOutputModule.html	(revision 254)
@@ -0,0 +1,173 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_GetOutputModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_GetOutputModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_GetOutputModule</h1>
+         <introduction>
+            <p>Reads the IO map of the output module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#23">Examples</a></li>
+               <li><a href="#25">See also</a></li>
+               <li><a href="#26">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>map = MAP_GetOutputModule(motor)</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>map = MAP_GetOutputModule(motor)</tt> returns the IO map of the output module at the given <tt>motor</tt> port. The <tt>motor</tt> port can be addressed by <tt>MOTOR_A</tt>, <tt>MOTOR_B</tt>, <tt>MOTOR_C</tt> and <tt>'all'</tt>. The return value <tt>map</tt> is a struct variable or cell array (<tt>'all'</tt> mode). It contains all output module information.
+         </p>
+         <p><b>Output:</b></p>
+         <p><tt>map.TachoCount</tt>         % internal, non-resettable rotation-counter (in degrees)
+         </p>
+         <p><tt>map.BlockTachoCount</tt>    % block tacho counter, current motor position, resettable using, ResetMotorAngle (NXT-G counter since block start)
+         </p>
+         <p><tt>map.RotationCount</tt>      % rotation tacho counter, current motor position (NXT-G counter since program start)
+         </p>
+         <p><tt>map.TachoLimit</tt>         % tacho/angle limit, 0 means none set
+         </p>
+         <p><tt>map.MotorRPM</tt>           % current pulse width modulation ?
+         </p>
+         <p><tt>map.Flags</tt>              % should be always ''. Flags are considered in MAP_SetOutputModule.
+         </p>
+         <p><tt>map.Mode</tt>               % output mode bitfield 1: MOTORON, 2: BRAKE, 4: REGULATED
+         </p>
+         <p><tt>map.ModeName</tt>           % output mode name interpreted by output mode bitfield
+         </p>
+         <p><tt>map.Speed</tt>              % motor power/speed
+         </p>
+         <p><tt>map.ActualSpeed</tt>        % current actual percentage of full power (regulation mode)
+         </p>
+         <p><tt>map.RegPParameter</tt>      % proportional term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RegIParameter</tt>      % integral term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RegDParameter</tt>      % derivate term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RunStateByte</tt>       % run state byte
+         </p>
+         <p><tt>map.RunStateName</tt>       % run state name interpreted by run state byte
+         </p>
+         <p><tt>map.RegModeByte</tt>        % regulation mode byte
+         </p>
+         <p><tt>map.RegModeName</tt>        % regulation mode name interpreted by regulation mode byte
+         </p>
+         <p><tt>map.Overloaded</tt>         % overloaded flag (true: speed regulation is unable to onvercome physical load on the motor)
+         </p>
+         <p><tt>map.SyncTurnParam</tt>      % current turn ratio, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+         </p>
+         <h2>Examples<a name="23"></a></h2><pre class="codeinput">   map = MAP_GetOutputModule(MOTOR_A);
+</pre><pre class="codeinput">   map = MAP_GetOutputModule(<span class="string">'all'</span>);
+</pre><h2>See also<a name="25"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a></p>
+         <h2>Signature<a name="26"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_GetOutputModule
+% Reads the IO map of the output module
+%%
+%% Syntax
+% |map = MAP_GetOutputModule(motor)|
+%%
+%% Description
+% |map = MAP_GetOutputModule(motor)| returns the IO map of the output module at the given
+% |motor| port. The |motor| port can be addressed by |MOTOR_A|, |MOTOR_B|, |MOTOR_C| and |'all'|.
+% The return value |map| is a struct variable or cell array (|'all'| mode). It contains all
+% output module information.
+%%
+%%
+% *Output:*
+%%
+% |map.TachoCount|         % internal, non-resettable rotation-counter (in degrees)
+%%
+% |map.BlockTachoCount|    % block tacho counter, current motor position, resettable using,
+% ResetMotorAngle (NXT-G counter since block start)
+%%
+% |map.RotationCount|      % rotation tacho counter, current motor position (NXT-G counter
+% since program start)
+%%
+% |map.TachoLimit|         % tacho/angle limit, 0 means none set
+%%
+% |map.MotorRPM|           % current pulse width modulation ?
+%%
+% |map.Flags|              % should be always ''. Flags are considered in MAP_SetOutputModule.
+%%
+% |map.Mode|               % output mode bitfield 1: MOTORON, 2: BRAKE, 4: REGULATED
+%%
+% |map.ModeName|           % output mode name interpreted by output mode bitfield
+%%
+% |map.Speed|              % motor power/speed
+%%
+% |map.ActualSpeed|        % current actual percentage of full power (regulation mode)
+%%
+% |map.RegPParameter|      % proportional term of the internal PID control algorithm
+%%
+% |map.RegIParameter|      % integral term of the internal PID control algorithm
+%%
+% |map.RegDParameter|      % derivate term of the internal PID control algorithm
+%%
+% |map.RunStateByte|       % run state byte
+%%
+% |map.RunStateName|       % run state name interpreted by run state byte
+%%
+% |map.RegModeByte|        % regulation mode byte
+%%
+% |map.RegModeName|        % regulation mode name interpreted by regulation mode byte
+%%
+% |map.Overloaded|         % overloaded flag (true: speed regulation is unable to onvercome
+% physical load on the motor)
+%%
+% |map.SyncTurnParam|      % current turn ratio, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+%%
+%% Examples
+   map = MAP_GetOutputModule(MOTOR_A);
+%%
+   map = MAP_GetOutputModule('all');
+%%
+%% See also
+% NXT_ReadIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/checkStatusByte.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/checkStatusByte.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/checkStatusByte.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>checkStatusByte</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_checkStatusByte">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
    [err errmsg] = checkStatusByte(status);
 </pre><h2>See also<a name="4"></a></h2>
-         <p><a href="BT_CollectPacket.html">BT_CollectPacket</a>, <a href="NXT_LSGetStatus.html">NXT_LSGetStatus</a></p>
+         <p><a href="COM_CollectPacket.html">COM_CollectPacket</a>, <a href="NXT_LSGetStatus.html">NXT_LSGetStatus</a></p>
          <h2>Signature<a name="5"></a></h2>
          <div>
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -75,5 +75,5 @@
 %%
 %% See also
-% BT_CollectPacket, NXT_LSGetStatus
+% COM_CollectPacket, NXT_LSGetStatus
 %%
 %% Signature
@@ -81,5 +81,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/StopMotor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/StopMotor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/StopMotor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>StopMotor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_StopMotor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -62,5 +62,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -114,5 +114,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlaySoundFile.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlaySoundFile.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_PlaySoundFile.html	(revision 254)
@@ -0,0 +1,108 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>NXT_PlaySoundFile</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_NXT_PlaySoundFile">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>NXT_PlaySoundFile</h1>
+         <introduction>
+            <p>Plays the given sound file on the NXT Brick</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#7">Examples</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>NXT_PlaySoundFile(filename, 'loop')</tt></p>
+         <p><tt>NXT_PlaySoundFile(filename, '', handle)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>NXT_PlaySoundFile(filename, loop)</tt> plays the soundfile stored on NXT Brick determined by the string <tt>filename</tt>. The maximum length is limited to 15 characters. The file extension '.rso' is added automatically if it was omitted. If the
+            loop parameter is equal to <tt>'loop'</tt> the playback loop is activated.
+         </p>
+         <p><tt>NXT_PlaySoundFile(name, loop, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a a struct containing a serial handle on a PC system and a file handle on a Linux system.
+         </p>
+         <p>If no Bluetooth <tt>handle</tt> is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
+         </p>
+         <p>For more details see the official LEGO Mindstorms communication protocol.</p>
+         <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_PlaySoundFile(<span class="string">'Goodmorning'</span>, 0);
+</pre><pre class="codeinput">   handle = NXT_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_StartProgram(<span class="string">'Goodmorning.rso'</span>, 1, handle);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="NXT_StopSoundPlayback.html">NXT_StopSoundPlayback</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% NXT_PlaySoundFile
+% Plays the given sound file on the NXT Brick
+%%
+%% Syntax
+% |NXT_PlaySoundFile(filename, 'loop')|
+%%
+% |NXT_PlaySoundFile(filename, '', handle)|
+%%
+%% Description
+% |NXT_PlaySoundFile(filename, loop)| plays the soundfile stored on NXT Brick determined by
+% the string |filename|. The maximum length is limited to 15 characters. The file
+% extension '.rso' is added automatically if it was omitted. If the loop
+% parameter is equal to |'loop'| the playback loop is activated.
+%%
+% |NXT_PlaySoundFile(name, loop, handle)| uses the given NXT connection |handle|.
+% This should be a a struct containing a serial handle on a PC system and a file handle on a Linux system.
+%%
+% If no Bluetooth |handle| is specified the default one (|COM_GetDefaultNXT|) is used.
+%%
+% For more details see the official LEGO Mindstorms communication protocol.
+%%
+%% Examples
+   NXT_PlaySoundFile('Goodmorning', 0);
+%%
+   handle = NXT_OpenNXT('bluetooth.ini','check');
+   NXT_StartProgram('Goodmorning.rso', 1, handle);
+%%
+%% See also
+% NXT_StopSoundPlayback
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SendKeepAlive.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SendKeepAlive.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SendKeepAlive.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_SendKeepAlive</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_SendKeepAlive">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,5 +35,5 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode)</tt></p>
-         <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, bt_handle)</tt></p>
+         <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode)</tt> sends a KeepAlive packet to the NXT Brick to get the current sleep time limit of the Brick in milliseconds. By the <tt>ReplyMode</tt> one can request an acknowledgement for the packet transmission. The two strings <tt>'reply'</tt> and <tt>'dontreply'</tt> are valid. <tt>status</tt> indicates if an error occures by the packet transmission. Function <tt>checkStatusBytes</tt> is interpreting this information per default. The value <tt>SleepTimeLimit</tt> contains the time in milliseconds after the NXT brick will turn off automatically. The variable will only be set if <tt>ReplyMode</tt> is <tt>'reply'</tt>. The sleep time limit setting can only  be modified using the on-screen-menu on the brick itself.
@@ -47,19 +47,19 @@
             answer: You obviously didn't use <tt>'reply'</tt> and still tried to get an answer.
          </p>
-         <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <p><b>Note:</b></p>
-         <p>This function is also used if you call <tt>BT_OpenHandle()</tt> with the optional <tt>'check'</tt> parameter. Then a keep-alive packet is send and the answer will be received to check for a correctly working bidirectional
+         <p>This function is also used if you call <tt>COM_OpenNXT()</tt> with the optional <tt>'check'</tt> parameter. Then a keep-alive packet is send and the answer will be received to check for a correctly working bidirectional
             bluetooth connection.
          </p>
          <h2>Examples<a name="11"></a></h2><pre class="codeinput">   [status SleepTimeLimit] = NXT_SendKeepAlive(<span class="string">'reply'</span>);
 </pre><pre class="codeinput">   NXT_SendKeepAlive(<span class="string">'dontreply'</span>);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   [status SleepTimeLimit] = NXT_SendKeepAlive(<span class="string">'reply'</span>, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   [status SleepTimeLimit] = NXT_SendKeepAlive(<span class="string">'reply'</span>, handle);
 </pre><h2>See also<a name="14"></a></h2>
-         <p><a href="BT_OpenHandle.html">BT_OpenHandle</a>, <a href="NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></p>
+         <p><a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="NXT_GetBatteryLevel.html">NXT_GetBatteryLevel</a></p>
          <h2>Signature<a name="15"></a></h2>
          <div>
@@ -69,5 +69,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -84,5 +84,5 @@
 % |[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode)|
 %%
-% |[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, bt_handle)|
+% |[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, handle)|
 %%
 %% Description
@@ -106,9 +106,9 @@
 % |'reply'| and still tried to get an answer.
 %%
-% |[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, bt_handle)| uses the given Bluetooth
-% connection |handle|. This should be a serial handle on a PC system and a file handle on a Linux
+% |[status SleepTimeLimit] = NXT_SendKeepAlive(ReplyMode, handle)| uses the given NXT
+% connection |handle|. This should be a struct containing a serial handle on a PC system and a file handle on a Linux
 % system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -117,5 +117,5 @@
 % *Note:*
 %%
-% This function is also used if you call |BT_OpenHandle()| with the optional |'check'| parameter. Then
+% This function is also used if you call |COM_OpenNXT()| with the optional |'check'| parameter. Then
 % a keep-alive packet is send and the answer will be received to check for a correctly working
 % bidirectional bluetooth connection.
@@ -126,9 +126,9 @@
    NXT_SendKeepAlive('dontreply');
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   [status SleepTimeLimit] = NXT_SendKeepAlive('reply', bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   [status SleepTimeLimit] = NXT_SendKeepAlive('reply', handle);
 %%
 %% See also
-% BT_OpenHandle, NXT_GetBatteryLevel
+% COM_OpenNXT, NXT_GetBatteryLevel
 %%
 %% Signature
@@ -136,5 +136,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSGetStatus.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSGetStatus.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSGetStatus.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_LSGetStatus</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_LSGetStatus">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          <p><tt>[BytesReady status] = NXT_LSGetStatus(port, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
@@ -52,8 +52,8 @@
          </p>
          <h2>Examples<a name="10"></a></h2><pre class="codeinput">   [BytesReady status] = NXT_LSGetStatus(SENSOR_3);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
    NXT_SetInputMode(SENSOR_1, <span class="string">'LOWSPEED_9V'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>);
    <span class="comment">% note that status can contain errorsmessages, use checkStatusByte</span>
-   [BytesReady status] = NXT_LSGetStatus(SENSOR_1, bt_handle);
+   [BytesReady status] = NXT_LSGetStatus(SENSOR_1, handle);
 </pre><h2>See also<a name="12"></a></h2>
          <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="checkStatusByte.html">checkStatusByte</a>, <a href="NXT_LSWrite.html">NXT_LSWrite</a>, <a href="NXT_LSRead.html">NXT_LSRead</a></p>
@@ -65,5 +65,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -93,5 +93,5 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -111,8 +111,8 @@
    [BytesReady status] = NXT_LSGetStatus(SENSOR_3);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
+   handle = COM_OpenNXT('bluetooth.ini','check');
    NXT_SetInputMode(SENSOR_1, 'LOWSPEED_9V', 'RAWMODE', 'dontreply');
    % note that status can contain errorsmessages, use checkStatusByte
-   [BytesReady status] = NXT_LSGetStatus(SENSOR_1, bt_handle);
+   [BytesReady status] = NXT_LSGetStatus(SENSOR_1, handle);
 %%
 %% See also
@@ -124,5 +124,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CollectPacket.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CollectPacket.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/COM_CollectPacket.html	(revision 254)
@@ -0,0 +1,151 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>COM_CollectPacket</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_COM_CollectPacket">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>COM_CollectPacket</h1>
+         <introduction>
+            <p>Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#8">Example</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>[type cmd statusbyte content] = COM_CollectPacket(handle)</tt></p>
+         <p><tt>[type cmd statusbyte content] = COM_CollectPacket(handle, 'dontcheck')</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>[type cmd statusbyte content] = COM_CollectPacket(handle)</tt> reads one packet on the communication channel specified by the <tt>handle</tt> struct (PC system: handle struct containing e.g. serial handle, Linux system: handle struct containing file handle). The
+            USB / Bluetooth handle struct can be obtained by the <tt>COM_OpenNXT</tt> or <tt>COM_GetDefaultNXT</tt>  command. The return value <tt>type</tt> specifies the telegram type according to the LEGO Mindstorms communication protcol. The <tt>cmd</tt> value determines the specific command. <tt>status</tt> indicates if an error occured on the NXT brick. The function <tt>checkStatusByte</tt> is interpreting this information per default. The <tt>content</tt> column vector represents the remaining payload of the whole return packet. E.g. it contains the current battery level in
+            milli volts, that then has to be converted to a valid integer from its byte representation (i.e. using <tt>wordbytes2dec</tt>).
+         </p>
+         <p><tt>[type cmd statusbyte content] = COM_CollectPacket(handle, 'dontcheck')</tt> disables the validation check of the <tt>status</tt> value by function <tt>checkStatusBytes</tt>.
+         </p>
+         <p>varargin : set to 'dontcheck' if the status byte should not automatically be checked. Only use this if you expect error messages.
+            Possible usage is for LSGetStatus, where this can happen...
+         </p>
+         <p>For more details about the syntax of the return packet see the LEGO Mindstorms communication protocol.</p>
+         <p>Note This function uses the specific Bluetooth settings from the ini-file that was specified when opening the handle. Parameters
+            used here are <tt>SendSendPause</tt> and <tt>SendReceivePause</tt>, which will cause this function to wait a certain amount of milliseconds between each consecutive send or receive operation
+            to avoid packet loss or buffer overflows inside the blutooth stack.
+         </p>
+         <h2>Example<a name="8"></a></h2><pre class="codeinput">   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+
+   [type cmd] = name2commandbytes(<span class="string">'KEEPALIVE'</span>);
+   content = [];  <span class="comment">% no payload in NXT command KEEPALIVE</span>
+   packet = COM_CreatePacket(type, cmd, <span class="string">'reply'</span>, content);
+
+   COM_SendPacket(packet, handle);
+
+   [type cmd statusbyte content] = COM_CollectPacket(handle);
+   <span class="comment">% Now you could check the statusbyte or interpret the content.</span>
+   <span class="comment">% Or maybe check for valid type and cmd before...</span>
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="COM_CreatePacket.html">COM_CreatePacket</a>, <a href="COM_SendPacket.html">COM_SendPacket</a>, <a href="COM_OpenNXT.html">COM_OpenNXT</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a>, <a href="COM_MakeBTConfigFile.html">COM_MakeBTConfigFile</a>, <a href="checkStatusByte.html">checkStatusByte</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Linus Atorf (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2007/10/14
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% COM_CollectPacket
+% Reads data from a USB or serial/Bluetooth port and retrieves exactly one packet
+%%
+%% Syntax
+% |[type cmd statusbyte content] = COM_CollectPacket(handle)|
+%%
+% |[type cmd statusbyte content] = COM_CollectPacket(handle, 'dontcheck')|
+%%
+%% Description
+% |[type cmd statusbyte content] = COM_CollectPacket(handle)| reads one packet on the communication
+% channel specified by the |handle| struct (PC system: handle struct containing e.g. serial
+% handle, Linux system: handle struct containing file handle). The USB / Bluetooth handle
+% struct can be obtained by the |COM_OpenNXT| or |COM_GetDefaultNXT|  command. The return
+% value |type| specifies the telegram type according to the LEGO Mindstorms communication
+% protcol. The |cmd| value determines the specific command. |status| indicates if an error
+% occured on the NXT brick. The function |checkStatusByte| is interpreting this information
+% per default. The |content| column vector represents the remaining payload of the whole return packet. E.g. it
+% contains the current battery level in milli volts, that then has to be converted to a valid
+% integer from its byte representation (i.e. using |wordbytes2dec|).
+%%
+% |[type cmd statusbyte content] = COM_CollectPacket(handle, 'dontcheck')| disables the validation
+% check of the |status| value by function |checkStatusBytes|.
+%%
+% varargin : set to 'dontcheck' if the status byte should not
+% automatically be checked. Only use this if you
+% expect error messages. Possible usage is for
+% LSGetStatus, where this can happen...
+%%
+% For more details about the syntax of the return packet see the LEGO Mindstorms communication protocol.
+%%
+% Note
+% This function uses the specific Bluetooth settings from the ini-file
+% that was specified when opening the handle. Parameters used here are
+% |SendSendPause| and |SendReceivePause|, which will cause this function
+% to wait a certain amount of milliseconds between each consecutive send
+% or receive operation to avoid packet loss or buffer overflows inside
+% the blutooth stack.
+%%
+%% Example
+   COM_MakeBTConfigFile();
+
+   handle = COM_OpenNXT('bluetooth.ini', 'check');
+
+   [type cmd] = name2commandbytes('KEEPALIVE');
+   content = [];  % no payload in NXT command KEEPALIVE
+   packet = COM_CreatePacket(type, cmd, 'reply', content);
+
+   COM_SendPacket(packet, handle);
+
+   [type cmd statusbyte content] = COM_CollectPacket(handle);
+   % Now you could check the statusbyte or interpret the content.
+   % Or maybe check for valid type and cmd before...
+%%
+%% See also
+% COM_CreatePacket, COM_SendPacket, COM_OpenNXT, COM_GetDefaultNXT,
+% COM_MakeBTConfigFile, checkStatusByte
+%%
+%% Signature
+%%
+% * *Author:* Linus Atorf (see AUTHORS)
+% * *Date:* 2007/10/14
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_SetOutputModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_SetOutputModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_SetOutputModule.html	(revision 254)
@@ -0,0 +1,185 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_SetOutputModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_SetOutputModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_SetOutputModule</h1>
+         <introduction>
+            <p>Writes the IO map to the output module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#22">Examples</a></li>
+               <li><a href="#24">See also</a></li>
+               <li><a href="#25">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>MAP_SetOutputModule(motor, map)</tt></p>
+         <p><tt>MAP_SetOutputModule(motor, map, varargin)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>map = MAP_SetOutputModule(motor, map)</tt> writes the IO <tt>map</tt> to the output module at the given motor <tt>motor</tt>. The <tt>motor</tt> port can be addressed by <tt>MOTOR_A</tt>, <tt>MOTOR_B</tt>, <tt>MOTOR_C</tt>. The <tt>map</tt> structure has to provide all output module information, listed below.
+         </p>
+         <p><b>Input:</b></p>
+         <p><tt>map.TachoCount</tt>         % internal, non-resettable rotation-counter (in degrees)
+         </p>
+         <p><tt>map.BlockTachoCount</tt>    % block tacho counter, current motor position, resettable using, ResetMotorAngle (NXT-G counter since block start)
+         </p>
+         <p><tt>map.RotationCount</tt>      % rotation tacho counter, current motor position (NXT-G counter since program start)
+         </p>
+         <p><tt>map.TachoLimit</tt>         % current set tacho/angle limit, 0 means none set
+         </p>
+         <p><tt>map.MotorRPM</tt>           % current pulse width modulation ?
+         </p>
+         <p><tt>map.Flags</tt>              % update flag bitfield, commits any changing (see also varargin)
+         </p>
+         <p><tt>map.Mode</tt>               % output mode bitfield 1: MOTORON, 2: BRAKE, 4: REGULATED
+         </p>
+         <p><tt>map.Speed</tt>              % current motor power/speed
+         </p>
+         <p><tt>map.ActualSpeed</tt>        % current actual percentage of full power (regulation mode)
+         </p>
+         <p><tt>map.RegPParameter</tt>      % proportional term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RegIParameter</tt>      % integral term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RegDParameter</tt>      % derivate term of the internal PID control algorithm
+         </p>
+         <p><tt>map.RunStateByte</tt>       % run state byte
+         </p>
+         <p><tt>map.RegModeByte</tt>        % regulation mode byte
+         </p>
+         <p><tt>map.Overloaded</tt>         % overloaded flag (true: speed regulation is unable to onvercome physical load on the motor)
+         </p>
+         <p><tt>map.SyncTurnParam</tt>      % current turn ratio, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+         </p>
+         <p>map = MAP_SetOutputModule(motor, map, varargin) sets the update flags explicit by the given arguments. 'UpdateMode':     
+                 commits changes to the mode property 'UpdateSpeed':          commits changes to the speed property 'UpdateTachoLimit':
+                commits changes to the tacho limit property 'ResetCounter':         resets internal movement counters, cancels current
+            goal, and resets internal error-correction system 'UpdatePID':            commits changes to PID regulation parameters 'ResetBlockTachoCount':
+            resets block tacho count (block-relative position counter (NXT-G)) 'ResetRotationCount':   resets rotation count (program-relative
+            position counter (NXT-G))
+         </p>
+         <h2>Examples<a name="22"></a></h2><pre class="codeinput">  MAP_SetOutputModule(MOTOR_A, map);
+</pre><pre class="codeinput">  map = MAP_GetOutputModule(MOTOR_A);
+  map.RegPParameter = 20;
+  MAP_SetOutputModule(MOTOR_A, map, <span class="string">'UpdatePID'</span>);
+</pre><h2>See also<a name="24"></a></h2>
+         <p><a href="MAP_GetOutputModule.html">MAP_GetOutputModule</a>, <a href="NXT_WriteIOMap.html">NXT_WriteIOMap</a></p>
+         <h2>Signature<a name="25"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_SetOutputModule
+% Writes the IO map to the output module
+%%
+%% Syntax
+% |MAP_SetOutputModule(motor, map)|
+%%
+% |MAP_SetOutputModule(motor, map, varargin)|
+%%
+%% Description
+% |map = MAP_SetOutputModule(motor, map)| writes the IO |map| to the output module at the given motor
+% |motor|. The |motor| port can be addressed by |MOTOR_A|, |MOTOR_B|, |MOTOR_C|. The |map| structure has
+% to provide all output module information, listed below.
+%%
+%%
+% *Input:*
+%%
+% |map.TachoCount|         % internal, non-resettable rotation-counter (in degrees)
+%%
+% |map.BlockTachoCount|    % block tacho counter, current motor position, resettable using,
+% ResetMotorAngle (NXT-G counter since block start)
+%%
+% |map.RotationCount|      % rotation tacho counter, current motor position (NXT-G counter
+% since program start)
+%%
+% |map.TachoLimit|         % current set tacho/angle limit, 0 means none set
+%%
+% |map.MotorRPM|           % current pulse width modulation ?
+%%
+% |map.Flags|              % update flag bitfield, commits any changing (see also varargin)
+%%
+% |map.Mode|               % output mode bitfield 1: MOTORON, 2: BRAKE, 4: REGULATED
+%%
+% |map.Speed|              % current motor power/speed
+%%
+% |map.ActualSpeed|        % current actual percentage of full power (regulation mode)
+%%
+% |map.RegPParameter|      % proportional term of the internal PID control algorithm
+%%
+% |map.RegIParameter|      % integral term of the internal PID control algorithm
+%%
+% |map.RegDParameter|      % derivate term of the internal PID control algorithm
+%%
+% |map.RunStateByte|       % run state byte
+%%
+% |map.RegModeByte|        % regulation mode byte
+%%
+% |map.Overloaded|         % overloaded flag (true: speed regulation is unable to onvercome
+% physical load on the motor)
+%%
+% |map.SyncTurnParam|      % current turn ratio, 1: 25%, 2:50%, 3:75%, 4:100% of full volume
+%%
+% map = MAP_SetOutputModule(motor, map, varargin) sets the update flags explicit by the given
+% arguments.
+% 'UpdateMode':           commits changes to the mode property
+% 'UpdateSpeed':          commits changes to the speed property
+% 'UpdateTachoLimit':     commits changes to the tacho limit property
+% 'ResetCounter':         resets internal movement counters, cancels current goal, and resets
+% internal error-correction system
+% 'UpdatePID':            commits changes to PID regulation parameters
+% 'ResetBlockTachoCount': resets block tacho count (block-relative position counter (NXT-G))
+% 'ResetRotationCount':   resets rotation count (program-relative position counter (NXT-G))
+%%
+%% Examples
+  MAP_SetOutputModule(MOTOR_A, map);
+%%
+  map = MAP_GetOutputModule(MOTOR_A);
+  map.RegPParameter = 20;
+  MAP_SetOutputModule(MOTOR_A, map, 'UpdatePID');
+%%
+%% See also
+% MAP_GetOutputModule, NXT_WriteIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetUIModule.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetUIModule.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MAP_GetUIModule.html	(revision 254)
@@ -0,0 +1,158 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>MAP_GetUIModule</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_MAP_GetUIModule">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>MAP_GetUIModule</h1>
+         <introduction>
+            <p>Reads the IO map of the user interface module</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#2">Description</a></li>
+               <li><a href="#21">Examples</a></li>
+               <li><a href="#22">See also</a></li>
+               <li><a href="#23">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>map = MAP_GetUIModule()</tt></p>
+         <h2>Description<a name="2"></a></h2>
+         <p><tt>map = MAP_GetUIModule()</tt> returns the IO map of the user interface module. The return value <tt>map</tt> is a struct variable. It contains all user interface module information.
+         </p>
+         <p><b>Output:</b></p>
+         <p><tt>map.PMenu</tt>              % ?
+         </p>
+         <p><tt>map.BatteryVoltage</tt>     % battery voltage in mili volt.
+         </p>
+         <p><tt>map.LMSfilename</tt>        % ?
+         </p>
+         <p><tt>map.Flags</tt>              % flag bitfield
+         </p>
+         <p><tt>map.State</tt>              % state value
+         </p>
+         <p><tt>map.Button</tt>             % button value
+         </p>
+         <p><tt>map.RunState</tt>           % VM run state
+         </p>
+         <p><tt>map.BatteryState</tt>       % battery level (0..4)
+         </p>
+         <p><tt>map.BluetoothState</tt>     % bluetooth state bitfield
+         </p>
+         <p><tt>map.UsbState</tt>           % USB state
+         </p>
+         <p><tt>map.SleepTimout</tt>        % sleep timeout value in minutes
+         </p>
+         <p><tt>map.SleepTimer</tt>         % current sleep timer in minutes
+         </p>
+         <p><tt>map.Rechargeable</tt>       % true if reachargeable battery is used
+         </p>
+         <p><tt>map.Volume</tt>             % volume level (0..4)
+         </p>
+         <p><tt>map.Error</tt>              % error value
+         </p>
+         <p><tt>map.OBPPointer</tt>         % on brick program pointer
+         </p>
+         <p><tt>map.ForceOff</tt>           % turn off brick if value is true
+         </p>
+         <h2>Examples<a name="21"></a></h2><pre class="codeinput">   map = MAP_GetUIModule();
+</pre><h2>See also<a name="22"></a></h2>
+         <p><a href="NXT_ReadIOMap.html">NXT_ReadIOMap</a></p>
+         <h2>Signature<a name="23"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/23
+               </li>
+               <li><b>Copyright:</b> 2007- 2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% MAP_GetUIModule
+% Reads the IO map of the user interface module
+%%
+%% Syntax
+% |map = MAP_GetUIModule()|
+%%
+%% Description
+% |map = MAP_GetUIModule()| returns the IO map of the user interface module. The return
+% value |map| is a struct variable. It contains all user interface module information.
+%%
+%%
+% *Output:*
+%%
+% |map.PMenu|              % ?
+%%
+% |map.BatteryVoltage|     % battery voltage in mili volt.
+%%
+% |map.LMSfilename|        % ?
+%%
+% |map.Flags|              % flag bitfield
+%%
+% |map.State|              % state value
+%%
+% |map.Button|             % button value
+%%
+% |map.RunState|           % VM run state
+%%
+% |map.BatteryState|       % battery level (0..4)
+%%
+% |map.BluetoothState|     % bluetooth state bitfield
+%%
+% |map.UsbState|           % USB state
+%%
+% |map.SleepTimout|        % sleep timeout value in minutes
+%%
+% |map.SleepTimer|         % current sleep timer in minutes
+%%
+% |map.Rechargeable|       % true if reachargeable battery is used
+%%
+% |map.Volume|             % volume level (0..4)
+%%
+% |map.Error|              % error value
+%%
+% |map.OBPPointer|         % on brick program pointer
+%%
+% |map.ForceOff|           % turn off brick if value is true
+%%
+%%
+%% Examples
+   map = MAP_GetUIModule();
+%%
+%% See also
+% NXT_ReadIOMap
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/23
+% * *Copyright:* 2007- 2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetMotorPosition.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetMotorPosition.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ResetMotorPosition.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_ResetMotorPosition</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_ResetMotorPosition">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,18 +35,18 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>NXT_ResetMotorPosition(port, isRelative)</tt></p>
-         <p><tt>NXT_ResetMotorPosition(port, isRelative, bt_handle)</tt></p>
+         <p><tt>NXT_ResetMotorPosition(port, isRelative, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>NXT_ResetMotorPosition(port, isRelative)</tt> resets the NXT internal counter of the given motor <tt>port</tt>. The value <tt>port</tt> can be addressed by the symbolic constants <tt>MOTOR_A</tt>, <tt>MOTOR_B</tt>, <tt>MOTOR_C</tt> analog to the labeling on the NXT Brick. The boolean flag <tt>isRelative</tt> determines the relative (BlockTachoCount) or absolute counter (RotationCount).
          </p>
-         <p><tt>NXT_ResetMotorPosition(port, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
+         <p><tt>NXT_ResetMotorPosition(port, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="7"></a></h2><pre class="codeinput">   NXT_ResetMotorPosition(MOTOR_B, true);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   NXT_ResetMotorPosition(MOTOR_A, false, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   NXT_ResetMotorPosition(MOTOR_A, false, handle);
 </pre><h2>See also<a name="9"></a></h2>
-         <p><a href="BT_GetDefaultHandle.html">BT_GetDefaultHandle</a></p>
+         <p><a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
          <h2>Signature<a name="10"></a></h2>
          <div>
@@ -56,5 +56,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -71,5 +71,5 @@
 % |NXT_ResetMotorPosition(port, isRelative)|
 %%
-% |NXT_ResetMotorPosition(port, isRelative, bt_handle)|
+% |NXT_ResetMotorPosition(port, isRelative, handle)|
 %%
 %% Description
@@ -79,8 +79,8 @@
 % relative (BlockTachoCount) or absolute counter (RotationCount).
 %%
-% |NXT_ResetMotorPosition(port, bt_handle)| uses the given Bluetooth connection |handle|. This should be a
-% serial handle on a PC system and a file handle on a Linux system.
+% |NXT_ResetMotorPosition(port, handle)| uses the given NXT connection |handle|. This should be a
+% struct containing a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -89,9 +89,9 @@
    NXT_ResetMotorPosition(MOTOR_B, true);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   NXT_ResetMotorPosition(MOTOR_A, false, bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   NXT_ResetMotorPosition(MOTOR_A, false, handle);
 %%
 %% See also
-% BT_GetDefaultHandle
+% COM_GetDefaultNXT
 %%
 %% Signature
@@ -99,5 +99,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSWrite.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSWrite.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_LSWrite.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_LSWrite</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_LSWrite">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          <p><tt>NXT_LSWrite(port, RXLength, data, ReplyMode, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
@@ -51,10 +51,10 @@
          </p>
          <h2>Example<a name="10"></a></h2><pre class="codeinput">   RequestLen = 1;
-   I2Cdata = hex2dec([<span class="string">'02'</span>; <span class="string">'42'</span>]); <span class="comment">% specific ultrasonic I&#65533;C command</span>
+   I2Cdata = hex2dec([<span class="string">'02'</span>; <span class="string">'42'</span>]); <span class="comment">% specific ultrasonic I&sup2;C command</span>
 
-   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
    NXT_SetInputMode(SENSOR_1, <span class="string">'LOWSPEED_9V'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>);
 
-   NXT_LSWrite(SENSOR_1, RequestLen, I2Cdata, <span class="string">'dontreply'</span>, bt_handle);
+   NXT_LSWrite(SENSOR_1, RequestLen, I2Cdata, <span class="string">'dontreply'</span>, handle);
 </pre><h2>See also<a name="11"></a></h2>
          <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="NXT_LSRead.html">NXT_LSRead</a>, <a href="NXT_LSGetStatus.html">NXT_LSGetStatus</a></p>
@@ -66,5 +66,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -94,5 +94,5 @@
 % |handle|. This should be a serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 % For more details see the official LEGO Mindstorms communication protocol.
@@ -110,10 +110,10 @@
 %% Example
    RequestLen = 1;
-   I2Cdata = hex2dec(['02'; '42']); % specific ultrasonic IÿC command
+   I2Cdata = hex2dec(['02'; '42']); % specific ultrasonic IÂ²C command
 
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
+   handle = COM_OpenNXT('bluetooth.ini','check');
    NXT_SetInputMode(SENSOR_1, 'LOWSPEED_9V', 'RAWMODE', 'dontreply');
 
-   NXT_LSWrite(SENSOR_1, RequestLen, I2Cdata, 'dontreply', bt_handle);
+   NXT_LSWrite(SENSOR_1, RequestLen, I2Cdata, 'dontreply', handle);
 %%
 %% See also
@@ -125,5 +125,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSwitch.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSwitch.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenSwitch.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>OpenSwitch</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_OpenSwitch">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -86,5 +86,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenLight.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenLight.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/OpenLight.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>OpenLight</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_OpenLight">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -52,5 +52,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -89,5 +89,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ReadIOMap.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ReadIOMap.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_ReadIOMap.html	(revision 254)
@@ -0,0 +1,110 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>NXT_ReadIOMap</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="script_NXT_ReadIOMap">
+<link type="text/css" rel="stylesheet" href="../../style.css">
+  </head>
+   <body>
+<p class="header">RWTH - Mindstorms NXT Toolbox</p>
+      <div class="content">
+         <h1>NXT_ReadIOMap</h1>
+         <introduction>
+            <p>Reads the IO map of the given module ID</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Syntax</a></li>
+               <li><a href="#3">Description</a></li>
+               <li><a href="#7">Examples</a></li>
+               <li><a href="#9">See also</a></li>
+               <li><a href="#10">Signature</a></li>
+            </ul>
+         </div>
+         <h2>Syntax<a name="1"></a></h2>
+         <p><tt>bytes = NXT_ReadIOMap(mod_id, offset, n_bytes)</tt></p>
+         <p><tt>bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle)</tt></p>
+         <h2>Description<a name="3"></a></h2>
+         <p><tt>bytes = NXT_ReadIOMap(mod_id, offset, n_bytes</tt>) returns the data <tt>bytes</tt> of the module identified by the given module ID <tt>mod_id</tt>. The total number of bytes is determined by <tt>n_bytes</tt> and the position of the first byte index by the <tt>offset</tt> parameter.
+         </p>
+         <p><tt>bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle)</tt> sends the IO map read command over the specific NXT <tt>handle</tt> (e.g. serial handle (PC) / file handle (Linux)).
+         </p>
+         <p>If no NXT <tt>handle</tt> is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
+         </p>
+         <p>For more details see the official LEGO Mindstorms communication protocol.</p>
+         <h2>Examples<a name="7"></a></h2><pre class="codeinput">   OutputModuleID = 131073
+   bytes = NXT_ReadIOMap(OutputModuleID, 0, 29);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   OutputModuleID = 131073
+   SoundModuleID = 524289, 0, 30, handle);
+</pre><h2>See also<a name="9"></a></h2>
+         <p><a href="NXT_WriteIOMap.html">NXT_WriteIOMap</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
+         <h2>Signature<a name="10"></a></h2>
+         <div>
+            <ul>
+               <li><b>Author:</b> Alexander Behrens (see AUTHORS)
+               </li>
+               <li><b>Date:</b> 2008/05/22
+               </li>
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
+               </li>
+            </ul>
+         </div>
+         <p class="footer"><br>
+            Published with wg_publish; V1.0<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% NXT_ReadIOMap
+% Reads the IO map of the given module ID
+%%
+%% Syntax
+% |bytes = NXT_ReadIOMap(mod_id, offset, n_bytes)|
+%%
+% |bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle)|
+%%
+%% Description
+% |bytes = NXT_ReadIOMap(mod_id, offset, n_bytes|) returns the data |bytes| of the module
+% identified by the given module ID |mod_id|. The total number of bytes is determined by |n_bytes|
+% and the position of the first byte index by the |offset| parameter.
+%%
+% |bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle)| sends the IO map read command
+% over the specific NXT |handle| (e.g. serial handle (PC) / file handle (Linux)).
+%%
+% If no NXT |handle| is specified the default one (|COM_GetDefaultNXT|) is used.
+%%
+% For more details see the official LEGO Mindstorms communication protocol.
+%%
+%% Examples
+   OutputModuleID = 131073
+   bytes = NXT_ReadIOMap(OutputModuleID, 0, 29);
+%%
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   OutputModuleID = 131073
+   SoundModuleID = 524289, 0, 30, handle);
+%%
+%% See also
+% NXT_WriteIOMap, COM_GetDefaultNXT
+%%
+%% Signature
+%%
+% * *Author:* Alexander Behrens (see AUTHORS)
+% * *Date:* 2008/05/22
+% * *Copyright:* 2007-2008, RWTH Aachen University
+%
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_2.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_2.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SENSOR_2.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SENSOR_2</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SENSOR_2">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SendMotorSettings.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SendMotorSettings.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SendMotorSettings.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SendMotorSettings</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SendMotorSettings">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -63,5 +63,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -114,5 +114,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_A.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_A.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/MOTOR_A.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>MOTOR_A</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_MOTOR_A">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -49,5 +49,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -78,5 +78,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SyncToMotor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SyncToMotor.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SyncToMotor.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SyncToMotor</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SyncToMotor">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -66,5 +66,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -123,5 +123,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetInputValues.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetInputValues.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_GetInputValues.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_GetInputValues</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_GetInputValues">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,5 +41,5 @@
          <p><tt>data = NXT_GetInputValues(port, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no Bluetooth handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p><b>Output:</b></p>
@@ -71,6 +71,6 @@
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="21"></a></h2><pre class="codeinput">   data = NXT_GetInputValues(SENSOR_3);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   data = NXT_GetInputValues(SENSOR_1, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   data = NXT_GetInputValues(SENSOR_1, handle);
 </pre><h2>See also<a name="23"></a></h2>
          <p><a href="NXT_SetInputMode.html">NXT_SetInputMode</a>, <a href="GetLight.html">GetLight</a>, <a href="GetSwitch.html">GetSwitch</a>, <a href="GetSound.html">GetSound</a>, <a href="GetUltrasonic.html">GetUltrasonic</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>
@@ -82,5 +82,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -109,5 +109,5 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no Bluetooth handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %%
@@ -151,6 +151,6 @@
    data = NXT_GetInputValues(SENSOR_3);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   data = NXT_GetInputValues(SENSOR_1, bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   data = NXT_GetInputValues(SENSOR_1, handle);
 %%
 %% See also
@@ -161,5 +161,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetInputMode.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetInputMode.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/NXT_SetInputMode.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>NXT_SetInputMode</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_NXT_SetInputMode">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -35,11 +35,11 @@
          <h2>Syntax<a name="1"></a></h2>
          <p><tt>status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode)</tt></p>
-         <p><tt>status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode, bt_handle)</tt></p>
+         <p><tt>status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode, handle)</tt></p>
          <h2>Description<a name="3"></a></h2>
          <p><tt>status = NXT_SetInputMode(InputPort, SensorTypeDesc, SensorModeDesc, ReplyMode)</tt> sets mode, configures and initializes the given sensor <tt>port</tt> to be ready to be read out. 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. The value <tt>SensorTypeDesc</tt> determines the sensor type. See all valid types below. <tt>SensorModeDesc</tt> represents the sensor mode. It specifies what mode the <tt>.ScaledVal</tt> from <tt>NXT_GetInputValues</tt> should be. Valid parameters see below. By the <tt>ReplyMode</tt> one can request an acknowledgement for the packet transmission. The two strings <tt>'reply'</tt> and <tt>'dontreply'</tt> are valid. The return value <tt>status</tt> indicates if an error occures by the packet transmission.
          </p>
-         <p><tt>status = NXT_SetInputMode(InputPort, SensorTypeDesc, SensorModeDesc, ReplyMode, bt_handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
-         </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p><tt>status = NXT_SetInputMode(InputPort, SensorTypeDesc, SensorModeDesc, ReplyMode, handle)</tt> uses the given NXT connection <tt>handle</tt>. This should be a struct containing a serial handle on a PC system and a file handle on a Linux system.
+         </p>
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <p><b>Input:</b></p>
@@ -94,6 +94,6 @@
          <p>For more details see the official LEGO Mindstorms communication protocol.</p>
          <h2>Examples<a name="32"></a></h2><pre class="codeinput">   status = NXT_SetInputMode(SENSOR_1, <span class="string">'SOUND_DB'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   status = NXT_SetInputMode(SENSOR_3, <span class="string">'LIGHT_ACTIVE'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   status = NXT_SetInputMode(SENSOR_3, <span class="string">'LIGHT_ACTIVE'</span>, <span class="string">'RAWMODE'</span>, <span class="string">'dontreply'</span>, handle);
 </pre><h2>See also<a name="34"></a></h2>
          <p><a href="NXT_GetInputValues.html">NXT_GetInputValues</a>, <a href="OpenLight.html">OpenLight</a>, <a href="OpenSound.html">OpenSound</a>, <a href="OpenSwitch.html">OpenSwitch</a>, <a href="OpenUltrasonic.html">OpenUltrasonic</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>
@@ -105,5 +105,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -120,5 +120,5 @@
 % |status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode)|
 %%
-% |status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode, bt_handle)|
+% |status = NXT_SetInputMode(port, SensorTypeDesc, SensorModeDesc, ReplyMode, handle)|
 %%
 %% Description
@@ -133,9 +133,9 @@
 % by the packet transmission.
 %%
-% |status = NXT_SetInputMode(InputPort, SensorTypeDesc, SensorModeDesc, ReplyMode, bt_handle)|
-% uses the given Bluetooth connection |handle|. This should be a serial handle on a PC system and
+% |status = NXT_SetInputMode(InputPort, SensorTypeDesc, SensorModeDesc, ReplyMode, handle)|
+% uses the given NXT connection |handle|. This should be a struct containing a serial handle on a PC system and
 % a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %%
@@ -203,6 +203,6 @@
    status = NXT_SetInputMode(SENSOR_1, 'SOUND_DB', 'RAWMODE', 'dontreply');
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   status = NXT_SetInputMode(SENSOR_3, 'LIGHT_ACTIVE', 'RAWMODE', 'dontreply', bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   status = NXT_SetInputMode(SENSOR_3, 'LIGHT_ACTIVE', 'RAWMODE', 'dontreply', handle);
 %%
 %% See also
@@ -213,5 +213,5 @@
 % * *Author:* Linus Atorf (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/ResetMotorAngle.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/ResetMotorAngle.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/ResetMotorAngle.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>ResetMotorAngle</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_ResetMotorAngle">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -41,11 +41,11 @@
          <p><tt>ResetMotorAngle(port, handle)</tt> uses the given Bluetooth connection <tt>handle</tt>. This should be a serial handle on a PC system and a file handle on a Linux system.
          </p>
-         <p>If no Bluetooth handle is specified the default one (<tt>BT_GetDefaultHandle</tt>) is used.
+         <p>If no NXT handle is specified the default one (<tt>COM_GetDefaultNXT</tt>) is used.
          </p>
          <h2>Examples<a name="6"></a></h2><pre class="codeinput">   ResetMotorAngle(MOTOR_A);
-</pre><pre class="codeinput">   bt_handle = BT_OpenHandle(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
-   ResetMotorAngle(MOTOR_C, bt_handle);
+</pre><pre class="codeinput">   handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>,<span class="string">'check'</span>);
+   ResetMotorAngle(MOTOR_C, handle);
 </pre><h2>See also<a name="8"></a></h2>
-         <p><a href="NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a>, <a href="GetMotorSettings.html">GetMotorSettings</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a>, <a href="BT_GetDefaultHandle.html">BT_GetDefaultHandle</a></p>
+         <p><a href="NXT_ResetMotorPosition.html">NXT_ResetMotorPosition</a>, <a href="GetMotorSettings.html">GetMotorSettings</a>, <a href="MOTOR_A.html">MOTOR_A</a>, <a href="MOTOR_B.html">MOTOR_B</a>, <a href="MOTOR_C.html">MOTOR_C</a>, <a href="COM_GetDefaultNXT.html">COM_GetDefaultNXT</a></p>
          <h2>Signature<a name="9"></a></h2>
          <div>
@@ -55,5 +55,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -81,14 +81,14 @@
 % serial handle on a PC system and a file handle on a Linux system.
 %%
-% If no Bluetooth handle is specified the default one (|BT_GetDefaultHandle|) is used.
+% If no NXT handle is specified the default one (|COM_GetDefaultNXT|) is used.
 %%
 %% Examples
    ResetMotorAngle(MOTOR_A);
 %%
-   bt_handle = BT_OpenHandle('bluetooth.ini','check');
-   ResetMotorAngle(MOTOR_C, bt_handle);
+   handle = COM_OpenNXT('bluetooth.ini','check');
+   ResetMotorAngle(MOTOR_C, handle);
 %%
 %% See also
-% NXT_ResetMotorPosition, GetMotorSettings, MOTOR_A, MOTOR_B, MOTOR_C, BT_GetDefaultHandle
+% NXT_ResetMotorPosition, GetMotorSettings, MOTOR_A, MOTOR_B, MOTOR_C, COM_GetDefaultNXT
 %%
 %% Signature
@@ -96,5 +96,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SwitchLamp.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SwitchLamp.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/functions/help/SwitchLamp.html	(revision 254)
@@ -12,5 +12,5 @@
       <title>SwitchLamp</title>
       <meta name="generator" content="MATLAB 7.5">
-      <meta name="date" content="2008-01-28">
+      <meta name="date" content="2008-07-19">
       <meta name="m-file" content="script_SwitchLamp">
 <link type="text/css" rel="stylesheet" href="../../style.css">
@@ -54,5 +54,5 @@
                <li><b>Date:</b> 2007/10/15
                </li>
-               <li><b>Copyright:</b> 2007, RWTH Aachen University
+               <li><b>Copyright:</b> 2007-2008, RWTH Aachen University
                </li>
             </ul>
@@ -96,5 +96,5 @@
 % * *Author:* Linus Atorf, Alexander Behrens (see AUTHORS)
 % * *Date:* 2007/10/15
-% * *Copyright:* 2007, RWTH Aachen University
+% * *Copyright:* 2007-2008, RWTH Aachen University
 %
 
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/examples.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/examples.html	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/examples.html	(revision 254)
@@ -6,97 +6,33 @@
 </head>
 
-<body>
+<body bgcolor="#FFFFFF" text="#000001">
 <p class="header">RWTH - Mindstorms NXT Toolbox</p>
-<h2>Examples</h2>
+<p align="center">
+<h1>Examples</h1>
+</p>
 
 <ul>
- <li><a href="#1">Example 1: Play Tone and Get Battery Level</a></li>
- <li><a href="#2">Example 2: Read Sound Sensor</a></li>
+<li><a href="BasicToolboxFunctionsTest.html">BasicToolboxFunctionsTest.m :  This little script calls and times some basic toolbox functions.
+</a></li>
+</br>
+<li><a href="NextGenerationUltrasound.html">NextGenerationUltrasound.m :  This little script demonstrates the results of the new ultrasound
+</a></li>
+</br>
+<li><a href="ToolboxSpeedTest.html">ToolboxSpeedTest.m :  This little script calls and times some basic toolbox functions,
+</a></li>
+</br>
+<li><a href="example_1_PlayTone.html">example_1_PlayTone.m :  Example to play a specific tone with the NXT Brick and retrieve the current battery level: 
+</a></li>
+</br>
+<li><a href="example_2_ReadSoundSensor.html">example_2_ReadSoundSensor.m :  Example to read the sound sensor value in db: Prepare workspace by cleaning all old settings to be on the safe side. 
+</a></li>
+</br>
+<li><a href="example_3_DriveAroundTable.html">example_3_DriveAroundTable.m :  In this little demo, our bot drives a square on the floor around a well known table.
+</a></li>
+</br>
+<li><a href="example_4_DriveUntilWall.html">example_4_DriveUntilWall.m :  In this little demo our robot drives forward until it detects a wall.
+</a></li>
+</br>
 </ul>
-<hr>
-
-
-<h3>Example 1: Play Tone and Get Battery Level<a name="1"></a></h3>
-Example to play a specific tone with the NXT Brick and retrieve the current battery level:
-<br><br>
-
-Prepare workspace by cleaning all old settings to be on the safe side.
-<pre class="codeinput">
-clear all
-close all
-</pre>
-
-Close previous Bluetooth connections.
-<pre class="codeinput">
-BT_CloseAllHandles;
-</pre>
-
-Open new Bluetooth connection according to the previous generated configuration file.
-<pre class="codeinput">
-bt_handle = BT_OpenHandle('bluetooth.ini', 'check');
-BT_SetDefaultHandle(bt_handle);
-</pre>
-
-Play tone with frequency 800Hz and duration of 500ms.
-<pre class="codeinput">
-NXT_PlayTone(800,500);
-</pre>
-
-Get current battery level.
-<pre class="codeinput">
-voltage = NXT_GetBatteryLevel<br>
->> voltage = 7623
-</pre>
-
-Close Bluetooth connection.
-<pre class="codeinput">
-BT_CloseHandle(bt_handle);
-</pre>
-<br>
-
-
-
-<h3>Example 2: Read Sound Sensor<a name="2"></a></h3>
-Example to read the sound sensor value in db:
-
-Prepare workspace by cleaning all old settings to be on the safe side.
-<pre class="codeinput">
-clear all
-close all
-</pre>
-
-Close previous Bluetooth connections.
-<pre class="codeinput">
-BT_CloseAllHandles;
-</pre>
-
-Open new Bluetooth connection according to the previous generated configuration file.
-<pre class="codeinput">
-bt_handle = BT_OpenHandle('bluetooth.ini', 'check');
-BT_SetDefaultHandle(bt_handle);
-</pre>
-
-Set the correct sound sensor mode and input port.
-<pre class="codeinput">
-OpenSound(SENSOR_2, 'DB');
-</pre>
-
-Get the current sound sensor value in dB.
-<pre class="codeinput">
-value = GetSound(SENSOR_2)<br>
->> value = 64
-</pre>
-
-Close the sound sensor.
-<pre class="codeinput">
-CloseSensor(SENSOR_2);
-</pre>
-
-Close Bluetooth connection.
-<pre class="codeinput">
-BT_CloseHandle(bt_handle);
-</pre>
-
-
 
 </body>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/BasicToolboxFunctionsTest.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/BasicToolboxFunctionsTest.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/BasicToolboxFunctionsTest.html	(revision 254)
@@ -0,0 +1,210 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>RWTH - Mindstorms NXT Toolbox functions test</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="BasicToolboxFunctionsTest"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>RWTH - Mindstorms NXT Toolbox functions test</h1>
+         <introduction>
+            <p>This little script calls and times some basic toolbox functions. The main purpose (next to benchmarking specific motor functions)
+               is a basic test if some of the functions are correctly implemented
+            </p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Set up MATLAB</a></li>
+               <li><a href="#2">Clear handles, obtain one</a></li>
+               <li><a href="#3">Reset all motors</a></li>
+               <li><a href="#4">Start some tests</a></li>
+               <li><a href="#5">Done</a></li>
+            </ul>
+         </div>
+         <h2>Set up MATLAB<a name="1"></a></h2><pre class="codeinput">clear
+close <span class="string">all</span>
+format <span class="string">compact</span>
+</pre><h2>Clear handles, obtain one<a name="2"></a></h2><pre class="codeinput">DebugMode <span class="string">on</span>
+
+COM_CloseNXT <span class="string">all</span>
+
+h = COM_OpenNXTEx(<span class="string">'Any'</span>, <span class="string">''</span>, <span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(h);
+
+DebugMode <span class="string">off</span>
+</pre><h2>Reset all motors<a name="3"></a></h2><pre class="codeinput">StopMotor <span class="string">all</span> <span class="string">off</span>
+
+<span class="keyword">for</span> j = MOTOR_A : MOTOR_C
+    NXT_ResetMotorPosition(j, false);
+    NXT_ResetMotorPosition(j, true);
+<span class="keyword">end</span><span class="comment">%for</span>
+</pre><h2>Start some tests<a name="4"></a></h2><pre class="codeinput">SetMotor(MOTOR_A);
+    SpeedRegulation <span class="string">on</span>
+    SetPower(80);
+    SetAngleLimit(500);
+    SetRampMode <span class="string">up</span>
+    SyncToMotor <span class="string">off</span>
+    SetTurnRatio(0); <span class="comment">% doesn't matter because no sync!</span>
+SendMotorSettings;
+
+pause(3);
+
+StopMotor(GetMotor(), <span class="string">'off'</span>);
+
+tic
+<span class="keyword">for</span> j = 1 : 400
+    SetMotor(MOTOR_A);
+        SpeedRegulation <span class="string">on</span>
+        SetPower(100);
+        SetAngleLimit(3 * j)
+        SetRampMode <span class="string">up</span>
+    SendMotorSettings;
+<span class="keyword">end</span><span class="comment">%for</span>
+toc
+
+pause(2);
+
+StopMotor(GetMotor(), <span class="string">'off'</span>);
+</pre><h2>Done<a name="5"></a></h2><pre class="codeinput">DebugMode <span class="string">on</span>
+COM_CloseNXT(h);
+DebugMode <span class="string">off</span>
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% RWTH - Mindstorms NXT Toolbox functions test
+% This little script calls and times some basic toolbox functions.
+% The main purpose (next to benchmarking specific motor functions) is a
+% basic test if some of the functions are correctly implemented
+
+
+%% Set up MATLAB
+clear
+close all
+format compact
+
+%% Clear handles, obtain one
+DebugMode on
+
+COM_CloseNXT all
+
+h = COM_OpenNXTEx('Any', '', 'bluetooth.ini', 'check');
+COM_SetDefaultNXT(h);
+
+DebugMode off
+
+
+%% Reset all motors
+StopMotor all off
+
+for j = MOTOR_A : MOTOR_C
+    NXT_ResetMotorPosition(j, false);
+    NXT_ResetMotorPosition(j, true);
+end%for
+
+%% Start some tests
+
+SetMotor(MOTOR_A);
+    SpeedRegulation on
+    SetPower(80);
+    SetAngleLimit(500);
+    SetRampMode up
+    SyncToMotor off
+    SetTurnRatio(0); % doesn't matter because no sync!
+SendMotorSettings;
+
+pause(3);
+
+StopMotor(GetMotor(), 'off');
+
+tic
+for j = 1 : 400
+    SetMotor(MOTOR_A);
+        SpeedRegulation on
+        SetPower(100);
+        SetAngleLimit(3 * j)
+        SetRampMode up
+    SendMotorSettings;
+end%for
+toc
+
+pause(2);
+
+StopMotor(GetMotor(), 'off');
+
+%% Done
+DebugMode on
+COM_CloseNXT(h);
+DebugMode off
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/example_4_DriveUntilWall.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/example_4_DriveUntilWall.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/example_4_DriveUntilWall.html	(revision 254)
@@ -0,0 +1,236 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Example 4: Drive Until Wall</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="example_4_DriveUntilWall"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>Example 4: Drive Until Wall</h1>
+         <introduction>
+            <p>In this little demo our robot drives forward until it detects a wall.</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Matlab</a></li>
+               <li><a href="#2">Constants</a></li>
+               <li><a href="#3">Initialize NXT connection</a></li>
+               <li><a href="#4">Reset Motor / remember start position</a></li>
+               <li><a href="#5">Prepare sensor</a></li>
+               <li><a href="#6">And GO!</a></li>
+               <li><a href="#7">Detect wall (sensor loop)</a></li>
+               <li><a href="#8">Immediately stop all motors!</a></li>
+               <li><a href="#9">Signal</a></li>
+               <li><a href="#10">Drive back home!</a></li>
+               <li><a href="#11">Wait until there</a></li>
+               <li><a href="#12">clean up</a></li>
+               <li><a href="#13">Close NXT connection</a></li>
+            </ul>
+         </div>
+         <h2>Matlab<a name="1"></a></h2><pre class="codeinput">clear <span class="string">all</span>
+close <span class="string">all</span>
+</pre><h2>Constants<a name="2"></a></h2><pre class="codeinput">MaxDriveTime = 30; <span class="comment">% in seconds, stop after this time...</span>
+USPort       = SENSOR_4;
+</pre><h2>Initialize NXT connection<a name="3"></a></h2><pre class="codeinput">handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(handle);
+</pre><h2>Reset Motor / remember start position<a name="4"></a></h2><pre class="codeinput">ResetMotorAngle(MOTOR_B);
+ResetMotorAngle(MOTOR_C);
+StartPos = GetMotorSettings(MOTOR_B);
+</pre><h2>Prepare sensor<a name="5"></a></h2><pre class="codeinput">OpenUltrasonic(USPort)
+</pre><h2>And GO!<a name="6"></a></h2><pre class="codeinput">SetMotor(MOTOR_B);
+    SyncToMotor(MOTOR_C);
+    SetPower(60);
+    SetAngleLimit(0);
+    SetTurnRatio(0);
+    SetRampMode (<span class="string">'off'</span>);
+SendMotorSettings();
+</pre><h2>Detect wall (sensor loop)<a name="7"></a></h2><pre class="codeinput">tictic(1);
+<span class="keyword">while</span>(toctoc(1) &lt; MaxDriveTime)
+   <span class="keyword">if</span> GetUltrasonic(USPort) &lt; 30
+       <span class="keyword">break</span>
+   <span class="keyword">end</span><span class="comment">%if</span>
+<span class="keyword">end</span><span class="comment">%while</span>
+</pre><h2>Immediately stop all motors!<a name="8"></a></h2><pre class="codeinput">StopMotor(<span class="string">'all'</span>, <span class="string">'off'</span>);
+<span class="comment">% but where are we now?</span>
+CurPos = GetMotorSettings(MOTOR_B);
+</pre><h2>Signal<a name="9"></a></h2><pre class="codeinput">NXT_PlayTone(440, 1000);
+</pre><h2>Drive back home!<a name="10"></a></h2>
+         <p>To try to understand what exactly the different rotation count values mean, we compare them just for fun</p><pre class="codeinput">TotalAbsDist = StartPos.TachoCount - CurPos.TachoCount;
+Dist         = CurPos.Angle;
+
+SetMotor(MOTOR_B);
+    SyncToMotor(MOTOR_C);
+    SetPower(-60);
+    SetAngleLimit(abs(Dist));
+SendMotorSettings();
+</pre><h2>Wait until there<a name="11"></a></h2><pre class="codeinput">WaitForMotor(1, MaxDriveTime);
+
+<span class="comment">% brake</span>
+StopMotor(<span class="string">'all'</span>, <span class="string">'brake'</span>);
+
+pause(1);
+</pre><h2>clean up<a name="12"></a></h2><pre class="codeinput">CloseSensor(SENSOR_4)
+StopMotor (<span class="string">'all'</span>, <span class="string">'off'</span>);
+</pre><h2>Close NXT connection<a name="13"></a></h2><pre class="codeinput">COM_CloseNXT(handle);
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% Example 4: Drive Until Wall
+% In this little demo our robot drives forward until it detects a wall.
+
+%% Matlab
+clear all
+close all
+
+
+%% Constants
+MaxDriveTime = 30; % in seconds, stop after this time...
+USPort       = SENSOR_4;
+
+
+%% Initialize NXT connection
+handle = COM_OpenNXT('bluetooth.ini', 'check');
+COM_SetDefaultNXT(handle);
+
+
+%% Reset Motor / remember start position
+ResetMotorAngle(MOTOR_B);
+ResetMotorAngle(MOTOR_C);
+StartPos = GetMotorSettings(MOTOR_B);
+
+
+%% Prepare sensor
+OpenUltrasonic(USPort)
+
+
+%% And GO!
+
+SetMotor(MOTOR_B);
+    SyncToMotor(MOTOR_C);
+    SetPower(60);
+    SetAngleLimit(0);
+    SetTurnRatio(0);
+    SetRampMode ('off');
+SendMotorSettings();
+
+
+%% Detect wall (sensor loop)
+tictic(1); 
+while(toctoc(1) < MaxDriveTime)
+   if GetUltrasonic(USPort) < 30
+       break
+   end%if
+end%while
+
+
+%% Immediately stop all motors!
+StopMotor('all', 'off');
+% but where are we now?
+CurPos = GetMotorSettings(MOTOR_B);
+
+
+%% Signal
+NXT_PlayTone(440, 1000);
+
+
+%% Drive back home!
+% To try to understand what exactly the different rotation count values
+% mean, we compare them just for fun
+TotalAbsDist = StartPos.TachoCount - CurPos.TachoCount;
+Dist         = CurPos.Angle;
+
+SetMotor(MOTOR_B);
+    SyncToMotor(MOTOR_C);
+    SetPower(-60);
+    SetAngleLimit(abs(Dist));
+SendMotorSettings();
+
+
+%% Wait until there
+WaitForMotor(1, MaxDriveTime);
+
+% brake
+StopMotor('all', 'brake');
+
+pause(1);
+
+%% clean up
+CloseSensor(SENSOR_4)
+StopMotor ('all', 'off');
+
+
+%% Close NXT connection
+COM_CloseNXT(handle);
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/example_1_PlayTone.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/example_1_PlayTone.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/example_1_PlayTone.html	(revision 254)
@@ -0,0 +1,118 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Example 1: Play Tone and Get Battery Level</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="example_1_PlayTone"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>Example 1: Play Tone and Get Battery Level</h1>
+         <p>Example to play a specific tone with the NXT Brick and retrieve the current battery level:</p>
+         <p>Prepare workspace by cleaning all old settings to be on the safe side.</p><pre class="codeinput">clear <span class="string">all</span>
+close <span class="string">all</span>
+
+<span class="comment">% Open new NXT connection according to the previous generated configuration file.</span>
+handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(handle);
+
+<span class="comment">%Play tone with frequency 800Hz and duration of 500ms.</span>
+NXT_PlayTone(800,500);
+
+<span class="comment">%Get current battery level.</span>
+voltage = NXT_GetBatteryLevel
+
+<span class="comment">%Close Bluetooth connection.</span>
+COM_CloseNXT(handle);
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% Example 1: Play Tone and Get Battery Level
+% Example to play a specific tone with the NXT Brick and retrieve the current battery level: 
+%
+% Prepare workspace by cleaning all old settings to be on the safe side. 
+clear all
+close all
+
+% Open new NXT connection according to the previous generated configuration file. 
+handle = COM_OpenNXT('bluetooth.ini', 'check');
+COM_SetDefaultNXT(handle);
+
+%Play tone with frequency 800Hz and duration of 500ms. 
+NXT_PlayTone(800,500);
+
+%Get current battery level. 
+voltage = NXT_GetBatteryLevel
+
+%Close Bluetooth connection. 
+COM_CloseNXT(handle);
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/ToolboxSpeedTest.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/ToolboxSpeedTest.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/ToolboxSpeedTest.html	(revision 254)
@@ -0,0 +1,272 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>RWTH - Mindstorms NXT Toolbox Benchmark</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="ToolboxSpeedTest"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>RWTH - Mindstorms NXT Toolbox Benchmark</h1>
+         <introduction>
+            <p>This little script calls and times some basic toolbox functions, so it can be used to get a rough idea of the machine's speed
+               or to compare different methods of communication (USB and Bluetooth)
+            </p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Set up Matlab</a></li>
+               <li><a href="#2">Set up ports</a></li>
+               <li><a href="#3">Clean up handles</a></li>
+               <li><a href="#4">Get handle</a></li>
+               <li><a href="#5">We're here!!! Yey, first command ever sent over USB in this toolbox  :-)</a></li>
+               <li><a href="#6">Try the light</a></li>
+               <li><a href="#7">What about the motor?</a></li>
+               <li><a href="#8">Now the ultrasound</a></li>
+               <li><a href="#9">Clean up</a></li>
+            </ul>
+         </div>
+         <h2>Set up Matlab<a name="1"></a></h2><pre class="codeinput">clear
+close <span class="string">all</span>
+format <span class="string">compact</span>
+
+disp(<span class="string">' '</span>)
+disp(<span class="string">'--- New USB Benchmark ---'</span>)
+</pre><h2>Set up ports<a name="2"></a></h2><pre class="codeinput">portLight   = SENSOR_1;
+portUS      = SENSOR_2;
+portMotor   = MOTOR_A;
+</pre><h2>Clean up handles<a name="3"></a></h2><pre class="codeinput">DebugMode <span class="string">on</span>
+
+COM_CloseNXT <span class="string">all</span>
+</pre><h2>Get handle<a name="4"></a></h2><pre class="codeinput">h = COM_OpenNXTEx(<span class="string">'Any'</span>, <span class="string">''</span>, <span class="string">'bluetooth.ini'</span>);
+COM_SetDefaultNXT(h);
+
+DebugMode <span class="string">off</span>
+</pre><h2>We're here!!! Yey, first command ever sent over USB in this toolbox  :-)<a name="5"></a></h2><pre class="codeinput">disp(<span class="string">'Playing 400 tones'</span>)
+tic
+<span class="keyword">for</span> i = 1 : 4
+    fprintf(<span class="string">'...'</span>)
+    <span class="keyword">for</span> j = 201:2:400
+        NXT_PlayTone(j, 2);
+    <span class="keyword">end</span><span class="comment">%if</span>
+<span class="keyword">end</span><span class="comment">%for</span>
+disp(<span class="string">'done'</span>)
+disp(sprintf(<span class="string">'%.1fms per tone, %.1f tones per second'</span>, toc * 2.5, 400 / toc))
+</pre><h2>Try the light<a name="6"></a></h2><pre class="codeinput">OpenLight(portLight, <span class="string">'active'</span>)
+disp(<span class="string">'Getting 100 light values'</span>)
+tic
+<span class="keyword">for</span> i = 1 : 100
+    GetLight(portLight);
+    <span class="keyword">if</span> mod(i, 8) == 0
+        fprintf(<span class="string">'.'</span>)
+    <span class="keyword">end</span><span class="comment">%if</span>
+<span class="keyword">end</span><span class="comment">%for</span>
+disp(<span class="string">'done'</span>)
+disp(sprintf(<span class="string">'%.1fms per reading, %.1f readings per second'</span>, toc * 10, 100 / toc))
+
+CloseSensor(portLight)
+</pre><h2>What about the motor?<a name="7"></a></h2><pre class="codeinput">disp(<span class="string">'Getting 100 motor values'</span>)
+tic
+<span class="keyword">for</span> i = 1 : 100
+    GetMotorSettings(portMotor);
+    <span class="keyword">if</span> mod(i, 8) == 0
+        fprintf(<span class="string">'.'</span>)
+    <span class="keyword">end</span><span class="comment">%if</span>
+<span class="keyword">end</span><span class="comment">%for</span>
+disp(<span class="string">'done'</span>)
+disp(sprintf(<span class="string">'%.1fms per reading, %.1f readings per second'</span>, toc * 10, 100 / toc))
+</pre><h2>Now the ultrasound<a name="8"></a></h2><pre class="codeinput">OpenUltrasonic(portUS)
+disp(<span class="string">'Getting 100 ultrasonic values'</span>)
+tic
+<span class="keyword">for</span> i = 1 : 100
+    GetUltrasonic(portUS);
+    <span class="keyword">if</span> mod(i, 8) == 0
+        fprintf(<span class="string">'.'</span>)
+    <span class="keyword">end</span><span class="comment">%if</span>
+<span class="keyword">end</span><span class="comment">%for</span>
+disp(<span class="string">'done'</span>)
+disp(sprintf(<span class="string">'%.1fms per reading, %.1f readings per second'</span>, toc * 10, 100 / toc))
+
+CloseSensor(portUS)
+</pre><h2>Clean up<a name="9"></a></h2><pre class="codeinput">DebugMode <span class="string">on</span>
+COM_CloseNXT(h);
+DebugMode <span class="string">off</span>
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% RWTH - Mindstorms NXT Toolbox Benchmark
+% This little script calls and times some basic toolbox functions,
+% so it can be used to get a rough idea of the machine's speed or to
+% compare different methods of communication (USB and Bluetooth)
+
+
+%% Set up Matlab
+clear
+close all
+format compact
+
+disp(' ')
+disp('REPLACE_WITH_DASH_DASH- New USB Benchmark REPLACE_WITH_DASH_DASH-')
+
+
+%% Set up ports
+
+portLight   = SENSOR_1;
+portUS      = SENSOR_2;
+portMotor   = MOTOR_A;
+
+
+%% Clean up handles
+DebugMode on
+
+COM_CloseNXT all
+
+
+%% Get handle
+
+h = COM_OpenNXTEx('Any', '', 'bluetooth.ini');
+COM_SetDefaultNXT(h);
+
+DebugMode off
+
+
+%% We're here!!! Yey, first command ever sent over USB in this toolbox  :-)
+
+disp('Playing 400 tones')
+tic
+for i = 1 : 4
+    fprintf('...')
+    for j = 201:2:400
+        NXT_PlayTone(j, 2);
+    end%if
+end%for
+disp('done')
+disp(sprintf('%.1fms per tone, %.1f tones per second', toc * 2.5, 400 / toc))
+
+
+%% Try the light
+
+OpenLight(portLight, 'active')
+disp('Getting 100 light values')
+tic
+for i = 1 : 100
+    GetLight(portLight);
+    if mod(i, 8) == 0
+        fprintf('.')
+    end%if
+end%for
+disp('done')
+disp(sprintf('%.1fms per reading, %.1f readings per second', toc * 10, 100 / toc))
+
+CloseSensor(portLight)
+
+
+%% What about the motor?
+
+disp('Getting 100 motor values')
+tic
+for i = 1 : 100
+    GetMotorSettings(portMotor);
+    if mod(i, 8) == 0
+        fprintf('.')
+    end%if
+end%for
+disp('done')
+disp(sprintf('%.1fms per reading, %.1f readings per second', toc * 10, 100 / toc))
+
+
+
+%% Now the ultrasound
+
+OpenUltrasonic(portUS)
+disp('Getting 100 ultrasonic values')
+tic
+for i = 1 : 100
+    GetUltrasonic(portUS);
+    if mod(i, 8) == 0
+        fprintf('.')
+    end%if
+end%for
+disp('done')
+disp(sprintf('%.1fms per reading, %.1f readings per second', toc * 10, 100 / toc))
+
+CloseSensor(portUS)
+
+
+
+%% Clean up
+
+DebugMode on
+COM_CloseNXT(h);
+DebugMode off
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/example_3_DriveAroundTable.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/example_3_DriveAroundTable.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/example_3_DriveAroundTable.html	(revision 254)
@@ -0,0 +1,272 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Example 3: Drive Around Table</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="example_3_DriveAroundTable"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>Example 3: Drive Around Table</h1>
+         <introduction>
+            <p>In this little demo, our bot drives a square on the floor around a well known table.</p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Clear and close</a></li>
+               <li><a href="#2">Constants</a></li>
+               <li><a href="#3">Open NXT connection</a></li>
+               <li><a href="#4">Initialize Motors...</a></li>
+               <li><a href="#5">Start the engines, main loop begins (repeated 4 times)</a></li>
+               <li><a href="#6">Drive</a></li>
+               <li><a href="#7">Check for the end end of table</a></li>
+               <li><a href="#8">Now please turn</a></li>
+               <li><a href="#9">Check for the end of rotation</a></li>
+               <li><a href="#10">Thats it. Repeat 4 times....</a></li>
+               <li><a href="#11">Close Bluetooth</a></li>
+            </ul>
+         </div>
+         <h2>Clear and close<a name="1"></a></h2><pre class="codeinput">clear <span class="string">all</span>
+close <span class="string">all</span>
+</pre><h2>Constants<a name="2"></a></h2><pre class="codeinput">TableLength      = 2850; <span class="comment">% in degrees of motor rotations :-)</span>
+QuarterTurnTicks = 245;  <span class="comment">% in motor degrees, how much is a 90&deg; turn of the bot?</span>
+</pre><h2>Open NXT connection<a name="3"></a></h2><pre class="codeinput">handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(handle);
+</pre><h2>Initialize Motors...<a name="4"></a></h2>
+         <p>we send this in case they should still be spinning or something...</p><pre class="codeinput">StopMotor(<span class="string">'all'</span>, <span class="string">'off'</span>);
+<span class="comment">% and we also "clean up" before we start:</span>
+ResetMotorAngle(MOTOR_B);
+ResetMotorAngle(MOTOR_C);
+</pre><h2>Start the engines, main loop begins (repeated 4 times)<a name="5"></a></h2>
+         <p>4 times because we got 4 equal sides of the table :-)</p><pre class="codeinput"><span class="keyword">for</span> j = 1 : 4
+</pre><h2>Drive<a name="6"></a></h2><pre class="codeinput">    SetMotor(MOTOR_B);
+        SyncToMotor(MOTOR_C); <span class="comment">% this means we have to set parameters only once</span>
+        SetPower(75);
+        SetAngleLimit(TableLength);
+        SetTurnRatio(0); <span class="comment">% straight ahead</span>
+    SendMotorSettings(); <span class="comment">% and GO!</span>
+
+    <span class="comment">% let the robot start:</span>
+    pause(1);
+</pre><h2>Check for the end end of table<a name="7"></a></h2><pre class="codeinput">    WaitForMotor(GetMotor);
+
+    <span class="comment">% give it a little time to correct its mistakes (hey synchronisation</span>
+    <span class="comment">% mode :-)</span>
+    pause(2);
+
+    <span class="comment">% apparently we've stopped!</span>
+    <span class="comment">% then release the motors</span>
+    StopMotor(<span class="string">'all'</span>, <span class="string">'off'</span>);
+    <span class="comment">% if we don't do that, syncing again doesn't work</span>
+
+    <span class="comment">% and again, if we don't rest relative counters, synced turning etc doesnt work...</span>
+    ResetMotorAngle(MOTOR_B);
+    ResetMotorAngle(MOTOR_C);
+</pre><h2>Now please turn<a name="8"></a></h2><pre class="codeinput">    SetMotor(MOTOR_B);
+        SyncToMotor(MOTOR_C); <span class="comment">% this means we have to set parameters only once</span>
+        SetPower(30) <span class="comment">% slower is more acurate</span>
+        SetAngleLimit(QuarterTurnTicks);
+        SetTurnRatio(100) <span class="comment">% turn right</span>
+    SendMotorSettings();  <span class="comment">% and GO!</span>
+
+    <span class="comment">% leave the bot time to start turning</span>
+    pause(1);
+</pre><h2>Check for the end of rotation<a name="9"></a></h2><pre class="codeinput">    WaitForMotor(GetMotor);
+
+    <span class="comment">% give it a little time to correct its mistakes (hey synchronisation mode :-)</span>
+    pause(2);
+
+    <span class="comment">% apparently we've stopped!</span>
+    <span class="comment">% then release the motors</span>
+    StopMotor(<span class="string">'all'</span>, <span class="string">'off'</span>);
+    <span class="comment">% if we don't do that, syncing again doesn't work</span>
+
+    <span class="comment">% and again, if we don't rest relative counters, synced turning etc doesnt work...</span>
+    ResetMotorAngle(MOTOR_B);
+    ResetMotorAngle(MOTOR_C);
+</pre><h2>Thats it. Repeat 4 times....<a name="10"></a></h2><pre class="codeinput"><span class="keyword">end</span><span class="comment">%for</span>
+
+
+<span class="comment">% Hey! End of a hard day's work</span>
+<span class="comment">% Just to show good style, we close down our motors again:</span>
+StopMotor(<span class="string">'all'</span>, <span class="string">'off'</span>);
+<span class="comment">% although this was completely unnecessary....</span>
+
+<span class="comment">% nice</span>
+</pre><h2>Close Bluetooth<a name="11"></a></h2><pre class="codeinput">COM_CloseNXT(handle);
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% Example 3: Drive Around Table
+% In this little demo, our bot drives a square on the floor around a well known table.
+
+%% Clear and close
+clear all
+close all
+
+
+%% Constants
+TableLength      = 2850; % in degrees of motor rotations :-)
+QuarterTurnTicks = 245;  % in motor degrees, how much is a 90Â° turn of the bot?
+
+
+%% Open NXT connection
+handle = COM_OpenNXT('bluetooth.ini', 'check');
+COM_SetDefaultNXT(handle);
+
+
+%% Initialize Motors...
+% we send this in case they should still be spinning or something...
+StopMotor('all', 'off');
+% and we also "clean up" before we start:
+ResetMotorAngle(MOTOR_B);
+ResetMotorAngle(MOTOR_C);
+
+
+%% Start the engines, main loop begins (repeated 4 times)
+% 4 times because we got 4 equal sides of the table :-)
+for j = 1 : 4
+
+%% Drive
+    SetMotor(MOTOR_B);
+        SyncToMotor(MOTOR_C); % this means we have to set parameters only once
+        SetPower(75);
+        SetAngleLimit(TableLength);
+        SetTurnRatio(0); % straight ahead
+    SendMotorSettings(); % and GO!
+    
+    % let the robot start:
+    pause(1);
+
+%% Check for the end end of table
+    WaitForMotor(GetMotor);
+    
+    % give it a little time to correct its mistakes (hey synchronisation
+    % mode :-)
+    pause(2);
+    
+    % apparently we've stopped!
+    % then release the motors
+    StopMotor('all', 'off');
+    % if we don't do that, syncing again doesn't work
+    
+    % and again, if we don't rest relative counters, synced turning etc doesnt work...
+    ResetMotorAngle(MOTOR_B);
+    ResetMotorAngle(MOTOR_C);
+    
+    
+%% Now please turn 
+
+    SetMotor(MOTOR_B);
+        SyncToMotor(MOTOR_C); % this means we have to set parameters only once
+        SetPower(30) % slower is more acurate
+        SetAngleLimit(QuarterTurnTicks);
+        SetTurnRatio(100) % turn right
+    SendMotorSettings();  % and GO!
+
+    % leave the bot time to start turning
+    pause(1);
+    
+%% Check for the end of rotation
+
+    WaitForMotor(GetMotor);
+    
+    % give it a little time to correct its mistakes (hey synchronisation mode :-)
+    pause(2);
+    
+    % apparently we've stopped!
+    % then release the motors
+    StopMotor('all', 'off');
+    % if we don't do that, syncing again doesn't work
+    
+    % and again, if we don't rest relative counters, synced turning etc doesnt work...
+    ResetMotorAngle(MOTOR_B);
+    ResetMotorAngle(MOTOR_C);
+    
+%% Thats it. Repeat 4 times....
+end%for
+
+
+% Hey! End of a hard day's work
+% Just to show good style, we close down our motors again:
+StopMotor('all', 'off');
+% although this was completely unnecessary....
+
+% nice
+
+
+%% Close Bluetooth
+
+COM_CloseNXT(handle);
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/example_2_ReadSoundSensor.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/example_2_ReadSoundSensor.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/example_2_ReadSoundSensor.html	(revision 254)
@@ -0,0 +1,121 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Example 2: Read Sound Sensor</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="example_2_ReadSoundSensor"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>Example 2: Read Sound Sensor</h1>
+         <p>Example to read the sound sensor value in db: Prepare workspace by cleaning all old settings to be on the safe side.</p><pre class="codeinput">clear <span class="string">all</span>
+close <span class="string">all</span>
+
+<span class="comment">% Open new NXT connection according to the previous generated configuration file.</span>
+handle = COM_OpenNXT(<span class="string">'bluetooth.ini'</span>, <span class="string">'check'</span>);
+COM_SetDefaultNXT(handle);
+
+<span class="comment">% Set the correct sound sensor mode and input port.</span>
+OpenSound(SENSOR_2, <span class="string">'DB'</span>);
+
+<span class="comment">% Get the current sound sensor value in dB.</span>
+value = GetSound(SENSOR_2)
+
+<span class="comment">% Close the sound sensor.</span>
+CloseSensor(SENSOR_2);
+
+<span class="comment">% Close Bluetooth connection.</span>
+COM_CloseNXT(handle);
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% Example 2: Read Sound Sensor
+% Example to read the sound sensor value in db: Prepare workspace by cleaning all old settings to be on the safe side. 
+clear all
+close all
+
+% Open new NXT connection according to the previous generated configuration file. 
+handle = COM_OpenNXT('bluetooth.ini', 'check');
+COM_SetDefaultNXT(handle);
+
+% Set the correct sound sensor mode and input port. 
+OpenSound(SENSOR_2, 'DB');
+
+% Get the current sound sensor value in dB. 
+value = GetSound(SENSOR_2)
+
+% Close the sound sensor. 
+CloseSensor(SENSOR_2);
+
+% Close Bluetooth connection. 
+COM_CloseNXT(handle);
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/doc/examples/NextGenerationUltrasound.html
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/doc/examples/NextGenerationUltrasound.html	(revision 254)
+++ /branches/atorf/RWTHMindstormsNXT/doc/examples/NextGenerationUltrasound.html	(revision 254)
@@ -0,0 +1,239 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
+<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+   
+      <!--
+This HTML is auto-generated from an M-file.
+To make changes, update the M-file and republish this document.
+      -->
+      <title>Next Generation Ultrasound</title>
+      <meta name="generator" content="MATLAB 7.5">
+      <meta name="date" content="2008-07-19">
+      <meta name="m-file" content="NextGenerationUltrasound"><style>
+
+body {
+  background-color: white;
+  margin:10px;
+}
+
+h1 {
+  color: #990000; 
+  font-size: x-large;
+}
+
+h2 {
+  color: #990000;
+  font-size: medium;
+}
+
+/* Make the text shrink to fit narrow windows, but not stretch too far in 
+wide windows. */ 
+p,h1,h2,div.content div {
+  max-width: 600px;
+  /* Hack for IE6 */
+  width: auto !important; width: 600px;
+}
+
+pre.codeinput {
+  background: #EEEEEE;
+  padding: 10px;
+}
+@media print {
+  pre.codeinput {word-wrap:break-word; width:100%;}
+} 
+
+span.keyword {color: #0000FF}
+span.comment {color: #228B22}
+span.string {color: #A020F0}
+span.untermstring {color: #B20000}
+span.syscmd {color: #B28C00}
+
+pre.codeoutput {
+  color: #666666;
+  padding: 10px;
+}
+
+pre.error {
+  color: red;
+}
+
+p.footer {
+  text-align: right;
+  font-size: xx-small;
+  font-weight: lighter;
+  font-style: italic;
+  color: gray;
+}
+
+  </style></head>
+   <body>
+      <div class="content">
+         <h1>Next Generation Ultrasound</h1>
+         <introduction>
+            <p>This little script demonstrates the results of the new ultrasound sensor's "snapshot mode"! Interpretation of the results
+               however is difficult.
+            </p>
+            <p>Just connect an NXT to the USB port, adjust the US port (or connect it to SENSOR_2), and see what's happening. The script
+               will exit after 200 measurements...
+            </p>
+         </introduction>
+         <h2>Contents</h2>
+         <div>
+            <ul>
+               <li><a href="#1">Set up Matlab</a></li>
+               <li><a href="#2">Set up ports</a></li>
+               <li><a href="#3">Get USB handle</a></li>
+               <li><a href="#4">Lets go then!</a></li>
+               <li><a href="#5">Clean up</a></li>
+            </ul>
+         </div>
+         <h2>Set up Matlab<a name="1"></a></h2><pre class="codeinput">clear
+close <span class="string">all</span>
+format <span class="string">compact</span>
+</pre><h2>Set up ports<a name="2"></a></h2><pre class="codeinput">portUS      = SENSOR_2;
+</pre><h2>Get USB handle<a name="3"></a></h2><pre class="codeinput">COM_CloseNXT <span class="string">all</span>
+h = COM_OpenNXT();
+COM_SetDefaultNXT(h);
+</pre><h2>Lets go then!<a name="4"></a></h2><pre class="codeinput">figure(<span class="string">'name'</span>, <span class="string">'Next Generation Ultrasound'</span>)
+set(gca, <span class="string">'Color'</span>, <span class="string">'black'</span>);
+hold <span class="string">on</span>
+
+
+OpenUltrasonic(portUS, <span class="string">'snapshot'</span>)
+
+n = 8;                  <span class="comment">% bytes the US sensor received</span>
+count = 200;            <span class="comment">% how many readings until end?</span>
+plotcols = 8;           <span class="comment">% how many out of n echos to plot?</span>
+outofrange = 160;       <span class="comment">% setting for out of range readings</span>
+
+<span class="comment">%colors = get(gca,'ColorOrder');</span>
+colors = flipud(hot(8));
+
+
+data = zeros(1, n);
+allX = (1:count+1)';
+
+<span class="keyword">for</span> i = 1 : count
+    USMakeSnapshot(portUS)
+    pause(0.05); <span class="comment">% wait for the sound to travel</span>
+    echos = USGetSnapshotResults(portUS);
+
+    <span class="comment">%echos = sort(echos);</span>
+    echos(echos == 255) = outofrange;
+
+    echos = [echos(1); diff(echos)];
+
+    data = vertcat(data, echos');
+    x = allX(1:i+1);
+
+    clf
+    hold <span class="string">on</span>
+    set(gca, <span class="string">'Color'</span>, <span class="string">'black'</span>);
+
+    axis([0 count 0 outofrange])
+
+    <span class="keyword">for</span> j = plotcols : -1 : 1
+        <span class="comment">%plot(data(:, j), '-')</span>
+        area(x, data(:, j) , <span class="string">'FaceColor'</span>, colors(j, :))
+    <span class="keyword">end</span><span class="comment">%for</span>
+
+<span class="keyword">end</span><span class="comment">%for</span>
+</pre><h2>Clean up<a name="5"></a></h2><pre class="codeinput">CloseSensor(portUS)
+COM_CloseNXT(h);
+</pre><p class="footer"><br>
+            Published with MATLAB&reg; 7.5<br></p>
+      </div>
+      <!--
+##### SOURCE BEGIN #####
+%% Next Generation Ultrasound
+% This little script demonstrates the results of the new ultrasound
+% sensor's "snapshot mode"! Interpretation of the results however is
+% difficult.
+%
+% Just connect an NXT to the USB port, adjust the US port (or connect it to
+% SENSOR_2), and see what's happening. The script will exit after 200
+% measurements...
+
+
+%% Set up Matlab
+clear
+close all
+format compact
+
+
+
+
+%% Set up ports
+
+portUS      = SENSOR_2;
+
+
+%% Get USB handle
+COM_CloseNXT all
+h = COM_OpenNXT();
+COM_SetDefaultNXT(h);
+
+
+
+%% Lets go then!
+figure('name', 'Next Generation Ultrasound')
+set(gca, 'Color', 'black');
+hold on
+
+
+OpenUltrasonic(portUS, 'snapshot')
+
+n = 8;                  % bytes the US sensor received
+count = 200;            % how many readings until end?
+plotcols = 8;           % how many out of n echos to plot?
+outofrange = 160;       % setting for out of range readings
+
+%colors = get(gca,'ColorOrder');
+colors = flipud(hot(8));
+
+
+data = zeros(1, n); 
+allX = (1:count+1)';
+
+for i = 1 : count
+    USMakeSnapshot(portUS)
+    pause(0.05); % wait for the sound to travel
+    echos = USGetSnapshotResults(portUS);
+
+    %echos = sort(echos);
+    echos(echos == 255) = outofrange;
+
+    echos = [echos(1); diff(echos)];
+
+    data = vertcat(data, echos');
+    x = allX(1:i+1);
+    
+    clf
+    hold on
+    set(gca, 'Color', 'black');
+    
+    axis([0 count 0 outofrange])
+
+    for j = plotcols : -1 : 1
+        %plot(data(:, j), '-')
+        area(x, data(:, j) , 'FaceColor', colors(j, :))
+    end%for
+    
+end%for
+
+
+%% Clean up
+CloseSensor(portUS)
+COM_CloseNXT(h);
+
+
+
+
+
+##### SOURCE END #####
+-->
+   </body>
+</html>
Index: /branches/atorf/RWTHMindstormsNXT/info.xml
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/info.xml	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/info.xml	(revision 254)
@@ -13,7 +13,8 @@
 
 
+<!-- 
 <listitem>
-<label>Watch Analog Sensor GUI</label>
-<callback>GUI_WatchAnalogSensor</callback>
+<label>Watch Sensor GUI</label>
+<callback>GUI_WatchSensor</callback>
 <icon>$toolbox/matlab/icons/figureicon.gif</icon>
 </listitem>
@@ -24,4 +25,5 @@
 <icon>$toolbox/matlab/icons/figureicon.gif</icon>
 </listitem>
+-->
 
 <listitem>
@@ -39,5 +41,5 @@
 <listitem>
   <label>RWTH Project - MATLAB meets LEGO Mindstorms -</label>
-  <callback>web http://www.lfb.rwth-aachen.de/de/lehre/ws07/mindstorms.html -browser;</callback>
+  <callback>web http://www.lfb.rwth-aachen.de/mindstorms -browser;</callback>
   <icon>$toolbox/matlab/icons/webicon.gif</icon>
 </listitem>
Index: /branches/atorf/RWTHMindstormsNXT/README.txt
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/README.txt	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/README.txt	(revision 254)
@@ -2,5 +2,5 @@
 * Readme file for RWTH - Mindstorms NXT Toolbox for MATLAB  *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-*             Version 1.00 - January 24th, 2008             *
+*            Version 2.00beta - July 18th, 2008             *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
@@ -42,9 +42,44 @@
 - MATLAB Version 7.4 (R2007a) or higher
 - LEGO® Mindstorms NXT building kit (e.g. Education Kit)
-- LEGO® Mindstorms NXT firmware v1.05 (recommended)
-- Bluetooth 2.0 adapter recommended model by LEGO® (e.g. AVM BlueFRITZ! USB)
-  supporting the serial port profile (SPP)
+- LEGO® Mindstorms NXT firmware v1.05 (recommended) 
+  OR a firmware compatible to the NXT's direct command interface
+- Bluetooth: Bluetooth 2.0 adapter recommended model by LEGO® 
+  (e.g. AVM BlueFRITZ! USB) supporting the serial port profile (SPP)  
+- USB: 
+  Windows: Official MINDSTORMS NXT Driver "Fantom", v1.02 or better 
+  Linux: libusb or libusb-dev  
 
-The SPP (serial port profile) means that a virtual serial port is installed, which maps all data to the Bluetooth interface. You can verify this under Windows inside the Device Manager, where an additional COM-Port should be visible. Under Linux, the bluez Bluetooth stack is recommended. A device called "rfcomm0" or similar should be present inside the /dev/ directory.
+
+*** Bluetooth:
+
+The SPP (serial port profile) means that a virtual serial port is installed, which maps all data to the Bluetooth interface. You can verify this under Windows inside the Device Manager, where an additional COM-Port should be visible. Under Linux, the bluez Bluetooth stack is recommended. The package you need is usually called "bluetooth" (for Debian's apt-get). This
+package should already contain "bluez-utils", if not, install it as well.
+On the our project website you'll find a zip-archive containing useful scripts for Linux.
+For Bluetooth-connection, the script "btconnect" is recommended, followed by the NXT's name or
+its MAC adress. Make sure the user has access rights to devices called "rfcomm". Sometimes this
+means adding the current user to the group "dialout".
+For Bluetooth under Linux the packages "dbns" and "dbns-x11" may also be required.
+The the command "bluetooth-applet --singleton" can be run from the console. After this, the script
+"btconnect" should work.
+
+
+*** USB:
+
+For USB-connections under Windows, the official LEGO MINDSTORMS NXT Device Driver v1.02 or
+better has to be installed (also called "Fantom"). It can be downloaded here:
+http://mindstorms.lego.com/support/updates/
+Direct download link is this:
+http://cache.lego.com/upload/contentTemplating/MindstormsUpdate/otherfiles/2057/upload1F7B2420-A5ED-44FF-9460-E262657029DC.zip
+
+On Linux systems, the open-source library libusb has to be present. It can be retrieved using
+a packet manager, for example Debian's apt-get. If installing the package "libusb" alone does
+not work, also "libusb-dev" should be retrieved and installed.
+
+
+
+To troubleshoot problems with opening connections to the NXT, the toolbox command
+>> DebugMode on
+can be used before trying to open a handle.
+
 
 
@@ -61,9 +96,11 @@
 - Also add the folder  demos  (it is a sub-directory of  RWTHMindstormsNXT )
 - Press Save to remember settings for future MATLAB sessions
-- Run the command >>BT_MakeConfigFile<< from the MATLAB command window  or:
+- Run the command >>COM_MakeBTConfigFile<< from the MATLAB command window  or:
   edit a bluetooth-example ini-file from the toolbox folder to suit your configuration.
+  You can skip this and the next step, if you don't want to use Bluetooth.
 - Establish a Bluetooth connection to your NXT using your adapter's driver software.
 - Authenticate with the NXT (a passkey request should appear)
-- You can now open Bluetooth connections using the toolbox command >>BT_OpenHandle<<
+- You can now open Bluetooth or USB connections using the toolbox commands 
+  >>COM_OpenNXT<< or >>COM_OpenNXTEx<<
 
 
@@ -72,6 +109,5 @@
 ---------------------
 
-The RWTH - Mindstorms NXT Toolbox is a collection of MATLAB-functions (so called m-files)
-and documentation / help files (mostly HTML). You have received these files in a compressed archive, that just needs to be extracted to a directory of your choice. This folder can even be on an external hard disk, USB stick or network drive. However it is recommended to use a folder on a normal hard disk drive for performance reasons.
+The RWTH - Mindstorms NXT Toolbox is a collection of MATLAB-functions (so called m-files) and documentation / help files (mostly HTML). You have received these files in a compressed archive that just needs to be extracted to a directory of your choice. This folder can even be on an external hard disk, USB stick or network drive. However it is recommended to use a folder on a normal hard disk drive for performance reasons.
 So just uncompress the archive and remember the folder you extracted it to.
 Make sure that the internal sub-directory structure is kept! Also it is important that all files are located in a sub-folder called "RWTHMindstormsNXT" (without the ") for identification purposes.
@@ -91,5 +127,5 @@
 
 Before you can begin working with Bluetooth connections, you have to create a settings file that contains information about your Bluetooth adapter and serial port.
-Either you can use the toolbox-command >>BT_MakeConfigFile<< inside the command window. A dialog window lets you enter the required parameters. The other way is to edit the example-files called "bluetooth-example-windows.ini" or "bluetooth-example-linux.ini", that are provided in the toolbox root folder.
+Either you can use the toolbox-command >>COM_MakeBTConfigFile<< inside the command window. A dialog window lets you enter the required parameters. The other way is to edit the example-files called "bluetooth-example-windows.ini" or "bluetooth-example-linux.ini", that are provided in the toolbox root folder.
 
 You can leave the default values for the beginning, the only thing you will have to enter is the COM-Port. The Bluetooth SPP (serial port profile) maps a virtual COM-Port to your adapter. Find out which port this is (under Windows you can use the Device Manager) and enter it in the dialog window (example: COM4). The other parameters are explained in the documentation. Advanced users should refer to the first chapter "Bluetooth connections and serial handles" of the section "Functions - Overview".
@@ -102,5 +138,6 @@
 Once the correct ini-file is created, it can be put inside the toolbox root path or anywhere inside the MATLAB search path for better convenience.
 
-You can now try the demos (which require a correct configuration file called "bluetooth.ini") or start opening connections using the toolbox command  BT_OpenHandle . Note that before this works, you have to establish a physical connection to your NXT. Depending on your Bluetooth adapter's driver software, this can be different. Once successful, the NXT and driver software will prompt you for a passkey. The authentification is then complete, and the toolbox should work properly.
+You can now try the demos (which require a correct configuration file called "bluetooth.ini") or start opening connections using the toolbox command COM_OpenNXT.
+Note that before this works, you have to establish a physical connection to your NXT. Depending on your Bluetooth adapter's driver software, this can be different. Once successful, the NXT and driver software will prompt you for a passkey. The authentification is then complete, and the toolbox should work properly.
 
 
@@ -125,6 +162,6 @@
 
 
-*  RWTH Aachen University Student Project - MATLAB meets LEGO Mindstorms 2007 / 2008
--> http://www.lfb.rwth-aachen.de/en/education/ws07/mindstorms.html
+*  RWTH Aachen University Student Project - MATLAB meets LEGO Mindstorms
+-> http://www.lfb.rwth-aachen.de/mindstorms
 
 
Index: /branches/atorf/RWTHMindstormsNXT/README
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/README	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/README	(revision 254)
@@ -2,5 +2,5 @@
 * Readme file for RWTH - Mindstorms NXT Toolbox for MATLAB  *
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-*             Version 1.00 - January 24th, 2008             *
+*            Version 2.00beta - July 18th, 2008             *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
@@ -42,9 +42,44 @@
 - MATLAB Version 7.4 (R2007a) or higher
 - LEGO® Mindstorms NXT building kit (e.g. Education Kit)
-- LEGO® Mindstorms NXT firmware v1.05 (recommended)
-- Bluetooth 2.0 adapter recommended model by LEGO® (e.g. AVM BlueFRITZ! USB)
-  supporting the serial port profile (SPP)
+- LEGO® Mindstorms NXT firmware v1.05 (recommended) 
+  OR a firmware compatible to the NXT's direct command interface
+- Bluetooth: Bluetooth 2.0 adapter recommended model by LEGO® 
+  (e.g. AVM BlueFRITZ! USB) supporting the serial port profile (SPP)  
+- USB: 
+  Windows: Official MINDSTORMS NXT Driver "Fantom", v1.02 or better 
+  Linux: libusb or libusb-dev  
 
-The SPP (serial port profile) means that a virtual serial port is installed, which maps all data to the Bluetooth interface. You can verify this under Windows inside the Device Manager, where an additional COM-Port should be visible. Under Linux, the bluez Bluetooth stack is recommended. A device called "rfcomm0" or similar should be present inside the /dev/ directory.
+
+*** Bluetooth:
+
+The SPP (serial port profile) means that a virtual serial port is installed, which maps all data to the Bluetooth interface. You can verify this under Windows inside the Device Manager, where an additional COM-Port should be visible. Under Linux, the bluez Bluetooth stack is recommended. The package you need is usually called "bluetooth" (for Debian's apt-get). This
+package should already contain "bluez-utils", if not, install it as well.
+On the our project website you'll find a zip-archive containing useful scripts for Linux.
+For Bluetooth-connection, the script "btconnect" is recommended, followed by the NXT's name or
+its MAC adress. Make sure the user has access rights to devices called "rfcomm". Sometimes this
+means adding the current user to the group "dialout".
+For Bluetooth under Linux the packages "dbns" and "dbns-x11" may also be required.
+The the command "bluetooth-applet --singleton" can be run from the console. After this, the script
+"btconnect" should work.
+
+
+*** USB:
+
+For USB-connections under Windows, the official LEGO MINDSTORMS NXT Device Driver v1.02 or
+better has to be installed (also called "Fantom"). It can be downloaded here:
+http://mindstorms.lego.com/support/updates/
+Direct download link is this:
+http://cache.lego.com/upload/contentTemplating/MindstormsUpdate/otherfiles/2057/upload1F7B2420-A5ED-44FF-9460-E262657029DC.zip
+
+On Linux systems, the open-source library libusb has to be present. It can be retrieved using
+a packet manager, for example Debian's apt-get. If installing the package "libusb" alone does
+not work, also "libusb-dev" should be retrieved and installed.
+
+
+
+To troubleshoot problems with opening connections to the NXT, the toolbox command
+>> DebugMode on
+can be used before trying to open a handle.
+
 
 
@@ -61,9 +96,11 @@
 - Also add the folder  demos  (it is a sub-directory of  RWTHMindstormsNXT )
 - Press Save to remember settings for future MATLAB sessions
-- Run the command >>BT_MakeConfigFile<< from the MATLAB command window  or:
+- Run the command >>COM_MakeBTConfigFile<< from the MATLAB command window  or:
   edit a bluetooth-example ini-file from the toolbox folder to suit your configuration.
+  You can skip this and the next step, if you don't want to use Bluetooth.
 - Establish a Bluetooth connection to your NXT using your adapter's driver software.
 - Authenticate with the NXT (a passkey request should appear)
-- You can now open Bluetooth connections using the toolbox command >>BT_OpenHandle<<
+- You can now open Bluetooth or USB connections using the toolbox commands 
+  >>COM_OpenNXT<< or >>COM_OpenNXTEx<<
 
 
@@ -72,6 +109,5 @@
 ---------------------
 
-The RWTH - Mindstorms NXT Toolbox is a collection of MATLAB-functions (so called m-files)
-and documentation / help files (mostly HTML). You have received these files in a compressed archive, that just needs to be extracted to a directory of your choice. This folder can even be on an external hard disk, USB stick or network drive. However it is recommended to use a folder on a normal hard disk drive for performance reasons.
+The RWTH - Mindstorms NXT Toolbox is a collection of MATLAB-functions (so called m-files) and documentation / help files (mostly HTML). You have received these files in a compressed archive that just needs to be extracted to a directory of your choice. This folder can even be on an external hard disk, USB stick or network drive. However it is recommended to use a folder on a normal hard disk drive for performance reasons.
 So just uncompress the archive and remember the folder you extracted it to.
 Make sure that the internal sub-directory structure is kept! Also it is important that all files are located in a sub-folder called "RWTHMindstormsNXT" (without the ") for identification purposes.
@@ -91,5 +127,5 @@
 
 Before you can begin working with Bluetooth connections, you have to create a settings file that contains information about your Bluetooth adapter and serial port.
-Either you can use the toolbox-command >>BT_MakeConfigFile<< inside the command window. A dialog window lets you enter the required parameters. The other way is to edit the example-files called "bluetooth-example-windows.ini" or "bluetooth-example-linux.ini", that are provided in the toolbox root folder.
+Either you can use the toolbox-command >>COM_MakeBTConfigFile<< inside the command window. A dialog window lets you enter the required parameters. The other way is to edit the example-files called "bluetooth-example-windows.ini" or "bluetooth-example-linux.ini", that are provided in the toolbox root folder.
 
 You can leave the default values for the beginning, the only thing you will have to enter is the COM-Port. The Bluetooth SPP (serial port profile) maps a virtual COM-Port to your adapter. Find out which port this is (under Windows you can use the Device Manager) and enter it in the dialog window (example: COM4). The other parameters are explained in the documentation. Advanced users should refer to the first chapter "Bluetooth connections and serial handles" of the section "Functions - Overview".
@@ -102,5 +138,6 @@
 Once the correct ini-file is created, it can be put inside the toolbox root path or anywhere inside the MATLAB search path for better convenience.
 
-You can now try the demos (which require a correct configuration file called "bluetooth.ini") or start opening connections using the toolbox command  BT_OpenHandle . Note that before this works, you have to establish a physical connection to your NXT. Depending on your Bluetooth adapter's driver software, this can be different. Once successful, the NXT and driver software will prompt you for a passkey. The authentification is then complete, and the toolbox should work properly.
+You can now try the demos (which require a correct configuration file called "bluetooth.ini") or start opening connections using the toolbox command COM_OpenNXT.
+Note that before this works, you have to establish a physical connection to your NXT. Depending on your Bluetooth adapter's driver software, this can be different. Once successful, the NXT and driver software will prompt you for a passkey. The authentification is then complete, and the toolbox should work properly.
 
 
@@ -125,6 +162,6 @@
 
 
-*  RWTH Aachen University Student Project - MATLAB meets LEGO Mindstorms 2007 / 2008
--> http://www.lfb.rwth-aachen.de/en/education/ws07/mindstorms.html
+*  RWTH Aachen University Student Project - MATLAB meets LEGO Mindstorms
+-> http://www.lfb.rwth-aachen.de/mindstorms
 
 
Index: /branches/atorf/RWTHMindstormsNXT/demos.xml
===================================================================
--- /branches/atorf/RWTHMindstormsNXT/demos.xml	(revision 3)
+++ /branches/atorf/RWTHMindstormsNXT/demos.xml	(revision 254)
@@ -6,5 +6,5 @@
 <icon>$toolbox/matlab/icons/matlabicon.gif</icon>
 <description>
-The RWTH - Mindstorms NXT Toolbox provide MATLAB functions to control LEGO Mindstorms NXT robots via a wireless Bluetooth connection.
+The RWTH - Mindstorms NXT Toolbox provides MATLAB functions to control LEGO Mindstorms NXT robots via USB or a wireless Bluetooth connection.
 </description>
 
@@ -25,11 +25,12 @@
 </demosection>
 
-<demosection>
+<!--
+ <demosection>
   <label>Monitoring Tools</label>
    <demoitem>
-      <label>Watch Analog Sensor GUI</label>
+      <label>Watch Sensor GUI</label>
       <type>M-GUI</type>
-      <callback>GUI_WatchAnalogSensor</callback>
-      <file>doc/demos/watchAnalogSensor_gui.html</file>
+      <callback>GUI_WatchSensor</callback>
+      <file>doc/demos/watchSensor_gui.html</file>
    </demoitem>
    
@@ -41,4 +42,4 @@
    </demoitem>
  </demosection>
-
+-->
 </demos>
