NXT Direct Commands

Non-Visible component
Category Requires Version
LEGO® MINDSTORMS® > NXT API 19, Android 4.4 - 4.4.4 KitKat 1

Overview

A component that provides a low-level interface to a LEGO MINDSTORMS NXT robot, with functions to send NXT Direct Commands.

Permissions

Methods

Delete File

Delete a file on the robot.

Params
file Name Text

Download File

Download a file to the robot.

Params
source Text
destination Text

Get Battery Level

Returns: Number

Get the battery level for the robot. Returns the voltage in millivolts.

Get Brick Name

Returns: Text

Get the brick name of the robot.

Get Current Program Name

Returns: Text

Get the name of currently running program on the robot.

Get Firmware Version

Returns: List

Get the firmware and protocol version numbers for the robot as a list where the first element is the firmware version number and the second element is the protocol version number.

Get Input Values

Returns: List

Reads the values of an input sensor on the robot. Assumes sensor type has been configured via SetInputMode.

Params
sensor Port Letter Text

Get Output State

Returns: List

Reads the output state of a motor on the robot.

Params
motor Port Letter Text

Keep Alive

Returns: Number

Keep Alive. Returns the current sleep time limit in milliseconds.

List Files

Returns: List

Returns a list containing the names of matching files found on the robot.

Params
wildcard Text

Ls Get Status

Returns: Number

Returns the count of available bytes to read.

Params
sensor Port Letter Text

Ls Read

Returns: List

Reads unsigned low speed data from an input sensor on the robot. Assumes sensor type has been configured via SetInputMode.

Params
sensor Port Letter Text

Ls Write

Writes low speed data to an input sensor on the robot. Assumes sensor type has been configured via SetInputMode.

Params
sensor Port Letter Text
list List
rx Data Length Number

Message Read

Returns: Text

Read a message from a mailbox (1-10) on the robot.

Params
mailbox Number

Message Write

Write a message to a mailbox (1-10) on the robot.

Params
mailbox Number
message Text

Play Sound File

Play a sound file on the robot.

Params
file Name Text

Play Tone

Make the robot play a tone.

Params
frequency Hz Number
duration Ms Number

Reset Input Scaled Value

Reset the scaled value of an input sensor on the robot.

Params
sensor Port Letter Text

Reset Motor Position

Reset motor position.

Params
motor Port Letter Text
relative Boolean

Set Brick Name

Set the brick name of the robot.

Params
name Text

Set Input Mode

Configure an input sensor on the robot.

Params
sensor Port Letter Text
sensor Type Number
sensor Mode Number

Set Output State

Sets the output state of a motor on the robot.

Params
motor Port Letter Text
power Number
mode Number
regulation Mode Number
turn Ratio Number
run State Number
tacho Limit Number

Start Program

Start execution of a previously downloaded program on the robot.

Params
program Name Text

Stop Program

Stop execution of the currently running program on the robot.

Stop Sound Playback

Stop sound playback.

Properties

Bluetooth Client

Component ➖ Write - Designer

The BluetoothClient component that should be used for communication.


Last update: January 27, 2020