NxtRemote creates an NxtRemote object which allows user to control Lego Mindstorms NXT robot from the device via Bluetooth.
app.CreateNxtRemote() -> app object - NxtRemote
The following methods are avaiable on the NxtRemote object:
ToColorName(
val ) ->
string - "black" or "blue" or "green" or "yellow" or "red" or "white"
number - hertz
number - milliseconds
play tone with given frequency for a given time in millinum_seconds
string - "A" or "B" or "C"
stop feeding motors with power
check wether phone/tablet wa connected to the NXT
string
Connects to the Bluetooth device
destroys object
Disconnect NXT from Phone/Tablet
string - "A" or "B" or "C"
number - percent
number - float
unknown
commands NXT to drive motors
?
?
Returns Bluetooth address of connected NXT brick
Returns Bluetooth name of connected NXT
returns current running program name
string - "A" or "B" or "C"
GetRotationCount
IsBluetoothEnabled
IsConnected
IsEnabled
string - "A" or "B" or "C"
Checks if a motor is currently powered
string - path to file or folder ( "/absolute/..." or "relative/..." )
number - integer
PlaySoundFile for given times
number - 1..4
string - "ColorDetect" or "LightSense" or "RedSense" or "GreenSense" or "BlueSense"
ReadColorSensor with option: num_intensity value between 0 and 1023,without options: 1:black,2:blue,3:green,4:yellow,5:red,6:white
number - 1..4
ReadDistanceSensor in centimeters
number - 1..4
boolean
ReadLightSensor -> value between 0 and 100
number - int
string - "Text" or "Number" or "Logic"
ReadMail
number - 1..4
string - "DB" or "DbA"
ReadSoundSensor
number - 1..4
ReadTouchSensor
?
show enable bluetooth dialog when bluetooth disabled
string - "A" or "B" or "C"
Reset motors
number - 1..10
string - "Text" or "Number" or "Logic"
string - or integer or
SendMail
inverts direction of motor commands
number - 1..4
string -
hexadecimal: "#rrggbb", "#aarrggbb"
colourName: "red", "green", ...
?
called when NXT has successfully connected via Bluetooth
called when NXT has successfully connected via Bluetooth
called when NXT has successfully connected via Bluetooth
show paired NXT list to connect to one via bluetooth
StartProgram
string - "A" or "B" or "C"
Stop
StopProgram
number - 1..6
convert str_col num_int got via ReadColorSensor to str_col name
object id