command | return | description |
nxt; open | --- | Initiates the NXT connection |
nxt; openBT | --- | Initiates the NXT connection over BT |
nxt; pair; resourceName; passkey; pairedResourceName | --- | Pairs the specified NXT to this computer |
nxt; unpair; resourceName | --- | Destroys the Bluetooth pairing that was previously established between this computer and the specified NXT |
nxt; close | --- | Closes the NXT connection |
nxt; batteryLevel | value | Returns the current battery level |
nxt; getName | value | Gets the name of the NXT |
nxt; startProgram; name | --- | Starts a program on the NXT with a specified name |
nxt; stopProgram | --- | Stops the current program if one is running |
nxt; playTone; | --- | Plays a tone |
nxt; playSoundFile; name, loop | --- | Plays a sound file on the NXT with a specified name |
nxt; stopSound | --- | Stops the currently playing sound |
command | return | description |
motor; getRotationCount; portNr | value | Returns the rotation of a motor |
motor; resetRotationCount; portNr; relative | --- | Resets the specified motor's rotation count |
motor; setForward; portNr; power | --- | Sets a motor to turn forward at a specified power |
motor; setReverse; portNr; power | --- | Sets a motor to turn backward at a specified power |
motor; stop; portNr; brake | --- | Tells a motor to stop turning |
motor; breakOn; portNr | --- | Tells a motor to turn the brake on |
motor; breakOff; portNr | --- | Tells a motor to turn the brake off |
motor; goTo; portNr; power; tacho; brake | --- | Tells a motor to go to a certian angle and then stop |
command | return | description |
sensor; setTouch; portNr | --- | Sets a sensor in a specified port to a touch sensor |
sensor; setSound; portNr | --- | Sets a sensor in a specified port to a sound sensor |
sensor; setLight; portNr, active | --- | Sets a sensor in a specified port to a light sensor |
sensor; setSonar; portNr | --- | Sets a sensor in a specified port to a sonar sensor |
sensor; setRaw; portNr | --- | Sets a sensor to return a raw value |
sensor; getValue; portNr | value | Retrieves the value of a sensor |
sensor; lsGetStatus; portNr | value | Gets the status of the lowspeed port |
sensor; getSonarValue; portNr | value | Retrieves the value for sonar sensors |
sensor; setSonarOff; portNr | --- | Tells the sonar sensor to stop sending pulses |
sensor; setSonarSingleShot; portNr | --- | Tells the sonar sensor to only send a pulse when you ask it what it's value is |
sensor; setSonarContinuous; portNr | --- | Tells the sonar sensor to continuously send pulses |
sensor; setSonarContinuousInterval; portNr, interval | --- | Sets the interval at which the sonar sensor sends a pulse |