1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:02 GMT 2008 -->
7 NXTCommand (leJOS NXT API documentation)
10 <META NAME="keywords" CONTENT="lejos.nxt.comm.NXTCommand class">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 parent.document.title="NXTCommand (leJOS NXT API documentation)";
25 <BODY BGCOLOR="white" onload="windowTitle();">
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36 <TR ALIGN="center" VALIGN="top">
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 <A HREF="../../../lejos/nxt/comm/NXTComm.html" title="class in lejos.nxt.comm"><B>PREV CLASS</B></A>
55 <A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57 <A HREF="../../../index.html?lejos/nxt/comm/NXTCommand.html" target="_top"><B>FRAMES</B></A>
58 <A HREF="NXTCommand.html" target="_top"><B>NO FRAMES</B></A>
59 <SCRIPT type="text/javascript">
62 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
84 <!-- ======== START OF CLASS DATA ======== -->
91 <A HREF="../../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>lejos.nxt.comm.NXTCommand</B>
95 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></DD>
99 <DT><PRE>public class <B>NXTCommand</B><DT>extends <A HREF="../../../java/lang/Object.html" title="class in java.lang">Object</A><DT>implements <A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></DL>
103 Remote access to a NXT via Bluetooth using LCP.
110 <!-- =========== FIELD SUMMARY =========== -->
112 <A NAME="field_summary"><!-- --></A>
113 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
114 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
115 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
116 <B>Field Summary</B></FONT></TH>
119 <A NAME="fields_inherited_from_class_lejos.nxt.comm.NXTProtocol"><!-- --></A>
120 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
122 <TH ALIGN="left"><B>Fields inherited from interface lejos.nxt.comm.<A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm">NXTProtocol</A></B></TH>
124 <TR BGCOLOR="white" CLASS="TableRowColor">
125 <TD><CODE><A HREF="../../../lejos/nxt/comm/NXTProtocol.html#ANGLE">ANGLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#ANGLESTEPSMODE">ANGLESTEPSMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BOOLEANMODE">BOOLEANMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BOOT">BOOT</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#BRAKE">BRAKE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CELSIUSMODE">CELSIUSMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CLOSE">CLOSE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#CUSTOM">CUSTOM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DELETE">DELETE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DELETE_USER_FLASH">DELETE_USER_FLASH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DIRECT_COMMAND_NOREPLY">DIRECT_COMMAND_NOREPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#DIRECT_COMMAND_REPLY">DIRECT_COMMAND_REPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FAHRENHEITMODE">FAHRENHEITMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FIND_FIRST">FIND_FIRST</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#FIND_NEXT">FIND_NEXT</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_BATTERY_LEVEL">GET_BATTERY_LEVEL</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_CURRENT_PROGRAM_NAME">GET_CURRENT_PROGRAM_NAME</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_DEVICE_INFO">GET_DEVICE_INFO</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_FIRMWARE_VERSION">GET_FIRMWARE_VERSION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_INPUT_VALUES">GET_INPUT_VALUES</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#GET_OUTPUT_STATE">GET_OUTPUT_STATE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#HIGH_SPEED_BUFFER">HIGH_SPEED_BUFFER</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#KEEP_ALIVE">KEEP_ALIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LIGHT_ACTIVE">LIGHT_ACTIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LIGHT_INACTIVE">LIGHT_INACTIVE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LOWSPEED">LOWSPEED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LOWSPEED_9V">LOWSPEED_9V</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_GET_STATUS">LS_GET_STATUS</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_READ">LS_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#LS_WRITE">LS_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MESSAGE_READ">MESSAGE_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MESSAGE_WRITE">MESSAGE_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MODEMASK">MODEMASK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_IDLE">MOTOR_RUN_STATE_IDLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RAMPDOWN">MOTOR_RUN_STATE_RAMPDOWN</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RAMPUP">MOTOR_RUN_STATE_RAMPUP</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTOR_RUN_STATE_RUNNING">MOTOR_RUN_STATE_RUNNING</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#MOTORON">MOTORON</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#NO_OF_SENSOR_TYPES">NO_OF_SENSOR_TYPES</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#NO_SENSOR">NO_SENSOR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_APPEND_DATA">OPEN_APPEND_DATA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_READ">OPEN_READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_READ_LINEAR">OPEN_READ_LINEAR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE">OPEN_WRITE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE_DATA">OPEN_WRITE_DATA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#OPEN_WRITE_LINEAR">OPEN_WRITE_LINEAR</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PCTFULLSCALEMODE">PCTFULLSCALEMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PERIODCOUNTERMODE">PERIODCOUNTERMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PLAY_SOUND_FILE">PLAY_SOUND_FILE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#PLAY_TONE">PLAY_TONE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL">POLL</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL_BUFFER">POLL_BUFFER</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#POLL_LENGTH">POLL_LENGTH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RAWMODE">RAWMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#READ">READ</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REFLECTION">REFLECTION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATED">REGULATED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_IDLE">REGULATION_MODE_IDLE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_MOTOR_SPEED">REGULATION_MODE_MOTOR_SPEED</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REGULATION_MODE_MOTOR_SYNC">REGULATION_MODE_MOTOR_SYNC</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#REPLY_COMMAND">REPLY_COMMAND</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RESET_MOTOR_POSITION">RESET_MOTOR_POSITION</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#RESET_SCALED_INPUT_VALUE">RESET_SCALED_INPUT_VALUE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_BRICK_NAME">SET_BRICK_NAME</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_INPUT_MODE">SET_INPUT_MODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SET_OUTPUT_STATE">SET_OUTPUT_STATE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SLOPEMASK">SLOPEMASK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SOUND_DB">SOUND_DB</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SOUND_DBA">SOUND_DBA</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#START_PROGRAM">START_PROGRAM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#STOP_PROGRAM">STOP_PROGRAM</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#STOP_SOUND_PLAYBACK">STOP_SOUND_PLAYBACK</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SWITCH">SWITCH</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SYSTEM_COMMAND_NOREPLY">SYSTEM_COMMAND_NOREPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#SYSTEM_COMMAND_REPLY">SYSTEM_COMMAND_REPLY</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#TEMPERATURE">TEMPERATURE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#TRANSITIONCNTMODE">TRANSITIONCNTMODE</A>, <A HREF="../../../lejos/nxt/comm/NXTProtocol.html#WRITE">WRITE</A></CODE></TD>
129 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
131 <A NAME="constructor_summary"><!-- --></A>
132 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135 <B>Constructor Summary</B></FONT></TH>
137 <TR BGCOLOR="white" CLASS="TableRowColor">
138 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#NXTCommand()">NXTCommand</A></B>()</CODE>
141 </TD>
145 <!-- ========== METHOD SUMMARY =========== -->
147 <A NAME="method_summary"><!-- --></A>
148 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151 <B>Method Summary</B></FONT></TH>
153 <TR BGCOLOR="white" CLASS="TableRowColor">
154 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155 <CODE> void</CODE></FONT></TD>
156 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#close()">close</A></B>()</CODE>
159 Call the close() command when your program ends, otherwise you
160 will have to turn the NXT brick off/on before you run another
161 program using iCommand.</TD>
163 <TR BGCOLOR="white" CLASS="TableRowColor">
164 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165 <CODE> byte</CODE></FONT></TD>
166 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#deleteUserFlash()">deleteUserFlash</A></B>()</CODE>
169 Deletes user flash memory (not including system modules).</TD>
171 <TR BGCOLOR="white" CLASS="TableRowColor">
172 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173 <CODE> int</CODE></FONT></TD>
174 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getBatteryLevel()">getBatteryLevel</A></B>()</CODE>
177 </TD>
179 <TR BGCOLOR="white" CLASS="TableRowColor">
180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
181 <CODE> <A HREF="../../../lejos/nxt/comm/DeviceInfo.html" title="class in lejos.nxt.comm">DeviceInfo</A></CODE></FONT></TD>
182 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getDeviceInfo()">getDeviceInfo</A></B>()</CODE>
185 </TD>
187 <TR BGCOLOR="white" CLASS="TableRowColor">
188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189 <CODE> <A HREF="../../../lejos/nxt/comm/FirmwareInfo.html" title="class in lejos.nxt.comm">FirmwareInfo</A></CODE></FONT></TD>
190 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getFirmwareVersion()">getFirmwareVersion</A></B>()</CODE>
193 </TD>
195 <TR BGCOLOR="white" CLASS="TableRowColor">
196 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197 <CODE> <A HREF="../../../lejos/nxt/comm/InputValues.html" title="class in lejos.nxt.comm">InputValues</A></CODE></FONT></TD>
198 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getInputValues(int)">getInputValues</A></B>(int port)</CODE>
201 </TD>
203 <TR BGCOLOR="white" CLASS="TableRowColor">
204 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205 <CODE> int</CODE></FONT></TD>
206 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#getTachoCount(int)">getTachoCount</A></B>(int port)</CODE>
209 Retrieves tacho count.</TD>
211 <TR BGCOLOR="white" CLASS="TableRowColor">
212 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
213 <CODE> void</CODE></FONT></TD>
214 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#open(java.lang.String)">open</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> name)</CODE>
217 </TD>
219 <TR BGCOLOR="white" CLASS="TableRowColor">
220 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221 <CODE> byte</CODE></FONT></TD>
222 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#playTone(int, int)">playTone</A></B>(int frequency,
223 int duration)</CODE>
226 Plays a tone on NXT speaker.</TD>
228 <TR BGCOLOR="white" CLASS="TableRowColor">
229 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
230 <CODE> byte</CODE></FONT></TD>
231 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#resetMotorPosition(int, boolean)">resetMotorPosition</A></B>(int port,
232 boolean relative)</CODE>
235 Resets the tachometer</TD>
237 <TR BGCOLOR="white" CLASS="TableRowColor">
238 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239 <CODE> byte</CODE></FONT></TD>
240 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setInputMode(int, int, int)">setInputMode</A></B>(int port,
242 int sensorMode)</CODE>
245 Tells the NXT what type of sensor you are using and the mode to operate in.</TD>
247 <TR BGCOLOR="white" CLASS="TableRowColor">
248 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249 <CODE> byte</CODE></FONT></TD>
250 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setOutputState(int, byte, int, int, int, int, int)">setOutputState</A></B>(int port,
253 int regulationMode,
256 int tachoLimit)</CODE>
259 </TD>
261 <TR BGCOLOR="white" CLASS="TableRowColor">
262 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
263 <CODE> void</CODE></FONT></TD>
264 <TD><CODE><B><A HREF="../../../lejos/nxt/comm/NXTCommand.html#setVerify(boolean)">setVerify</A></B>(boolean verify)</CODE>
267 </TD>
270 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
271 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
272 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
273 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
275 <TR BGCOLOR="white" CLASS="TableRowColor">
276 <TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
282 <!-- ========= CONSTRUCTOR DETAIL ======== -->
284 <A NAME="constructor_detail"><!-- --></A>
285 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
286 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
287 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
288 <B>Constructor Detail</B></FONT></TH>
292 <A NAME="NXTCommand()"><!-- --></A><H3>
295 public <B>NXTCommand</B>()</PRE>
299 <!-- ============ METHOD DETAIL ========== -->
301 <A NAME="method_detail"><!-- --></A>
302 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
303 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
304 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
305 <B>Method Detail</B></FONT></TH>
309 <A NAME="open(java.lang.String)"><!-- --></A><H3>
312 public void <B>open</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> name)
313 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
321 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
326 <A NAME="setOutputState(int, byte, int, int, int, int, int)"><!-- --></A><H3>
329 public byte <B>setOutputState</B>(int port,
332 int regulationMode,
336 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
342 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - Output port (0 - 2 or 0xFF for all three)<DD><CODE>power</CODE> - - Setpoint for power. (-100 to 100)<DD><CODE>mode</CODE> - - Setting the modes MOTORON, BRAKE, and/or REGULATED. This parameter is a bitfield, so to put it in brake mode and regulated, use BRAKEMODE + REGULATED<DD><CODE>regulationMode</CODE> - - see NXTProtocol for enumerations<DD><CODE>turnRatio</CODE> - - Need two motors? (-100 to 100)<DD><CODE>runState</CODE> - - see NXTProtocol for enumerations<DD><CODE>tachoLimit</CODE> - - Number of degrees(?) to rotate before stopping.
344 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
349 <A NAME="getTachoCount(int)"><!-- --></A><H3>
352 public int <B>getTachoCount</B>(int port)
353 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
355 <DD>Retrieves tacho count.
361 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - 0 to 3
362 <DT><B>Returns:</B><DD>tacho count
364 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
369 <A NAME="resetMotorPosition(int, boolean)"><!-- --></A><H3>
370 resetMotorPosition</H3>
372 public byte <B>resetMotorPosition</B>(int port,
373 boolean relative)
374 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
376 <DD>Resets the tachometer
382 <DT><B>Parameters:</B><DD><CODE>port</CODE> - Output port (0-2)<DD><CODE>relative</CODE> - TRUE: position relative to last movement, FALSE: absolute position
384 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
389 <A NAME="setVerify(boolean)"><!-- --></A><H3>
392 public void <B>setVerify</B>(boolean verify)</PRE>
403 <A NAME="close()"><!-- --></A><H3>
406 public void <B>close</B>()
407 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
409 <DD>Call the close() command when your program ends, otherwise you
410 will have to turn the NXT brick off/on before you run another
411 program using iCommand.
419 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
424 <A NAME="getBatteryLevel()"><!-- --></A><H3>
427 public int <B>getBatteryLevel</B>()
428 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
436 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
441 <A NAME="getInputValues(int)"><!-- --></A><H3>
444 public <A HREF="../../../lejos/nxt/comm/InputValues.html" title="class in lejos.nxt.comm">InputValues</A> <B>getInputValues</B>(int port)
445 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
453 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
458 <A NAME="setInputMode(int, int, int)"><!-- --></A><H3>
461 public byte <B>setInputMode</B>(int port,
464 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
466 <DD>Tells the NXT what type of sensor you are using and the mode to operate in.
472 <DT><B>Parameters:</B><DD><CODE>port</CODE> - - 0 to 3<DD><CODE>sensorType</CODE> - - Enumeration for sensor type (see NXTProtocol)<DD><CODE>sensorMode</CODE> - - Enumeration for sensor mode (see NXTProtocol)
474 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
479 <A NAME="playTone(int, int)"><!-- --></A><H3>
482 public byte <B>playTone</B>(int frequency,
484 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
486 <DD>Plays a tone on NXT speaker. If a new tone is sent while the previous tone is playing,
487 the new tone command will stop the old tone command.
493 <DT><B>Parameters:</B><DD><CODE>frequency</CODE> - <DD><CODE>duration</CODE> - - In milliseconds.
494 <DT><B>Returns:</B><DD>- Returns true if command worked, false if it failed.
496 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
501 <A NAME="getDeviceInfo()"><!-- --></A><H3>
504 public <A HREF="../../../lejos/nxt/comm/DeviceInfo.html" title="class in lejos.nxt.comm">DeviceInfo</A> <B>getDeviceInfo</B>()
505 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
513 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
518 <A NAME="getFirmwareVersion()"><!-- --></A><H3>
519 getFirmwareVersion</H3>
521 public <A HREF="../../../lejos/nxt/comm/FirmwareInfo.html" title="class in lejos.nxt.comm">FirmwareInfo</A> <B>getFirmwareVersion</B>()
522 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
530 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
535 <A NAME="deleteUserFlash()"><!-- --></A><H3>
538 public byte <B>deleteUserFlash</B>()
539 throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
541 <DD>Deletes user flash memory (not including system modules).
548 <DT><B>Returns:</B><DD>0 for success
550 <DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE></DL>
553 <!-- ========= END OF CLASS DATA ========= -->
557 <!-- ======= START OF BOTTOM NAVBAR ====== -->
558 <A NAME="navbar_bottom"><!-- --></A>
559 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
560 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
562 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
563 <A NAME="navbar_bottom_firstrow"><!-- --></A>
564 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
565 <TR ALIGN="center" VALIGN="top">
566 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
567 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
568 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
569 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
570 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
571 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
572 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
576 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
582 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
583 <A HREF="../../../lejos/nxt/comm/NXTComm.html" title="class in lejos.nxt.comm"><B>PREV CLASS</B></A>
584 <A HREF="../../../lejos/nxt/comm/NXTProtocol.html" title="interface in lejos.nxt.comm"><B>NEXT CLASS</B></A></FONT></TD>
585 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
586 <A HREF="../../../index.html?lejos/nxt/comm/NXTCommand.html" target="_top"><B>FRAMES</B></A>
587 <A HREF="NXTCommand.html" target="_top"><B>NO FRAMES</B></A>
588 <SCRIPT type="text/javascript">
591 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
596 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
603 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
604 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
605 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
606 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
609 <A NAME="skip-navbar_bottom"></A>
610 <!-- ======== END OF BOTTOM NAVBAR ======= -->