Index of values


A
a [Mindstorm.Motor]
The motor port A.
all [Mindstorm.Motor]
Special value representing all 3 ports.

B
b [Mindstorm.Motor]
The motor port B.
battery_level [Mindstorm]
battery_level conn return the voltages in millivolts of the battery on the brick.
bluetooth_reset [Mindstorm]
boot [Mindstorm]

C
c [Mindstorm.Motor]
The motor port C.
close [Mindstorm.Find]
close_iterator i closes the iterator i.
close [Mindstorm]
close conn closes the connection conn to the brick.
close_in [Mindstorm]
close_in ch closes the channel ch.
close_out [Mindstorm]
close_out ch closes the channel ch.
connect_bluetooth [Mindstorm]
connect_bluetooth bdaddr connects through bluetooth to the brick with bluetooth address bdaddr.
connect_usb [Mindstorm]
Not yet implemented.
current [Mindstorm.Find]
Find.current i returns the current filename.
current_size [Mindstorm.Find]
Find.current_size i returns the current filename size (number of bytes).

D
delete_user_flash [Mindstorm]

F
firmware_version [Mindstorm]
firmware_version conn returns a tuple (p1, p0, f1, f0) where p1 is the major version of the protocol, p0 is the minor version of the protocol, f1 is the major version of the firmware, f0 is the minor version of the firmware,
fold [Mindstorm.Find]
fold f fpatt a0 folds f on all the filenames matching the pattern fpatt (see Mindstorm.Find.patt for the accepted patterns).

G
get [Mindstorm.Sensor.Ultrasonic]
Ultrasonic.get us var returns the content of the variable var on the sensor (detailed underneath).
get [Mindstorm.Sensor]
get conn p returns the data read on port p.
get [Mindstorm.Motor]
get conn p returns (state, tach_count, block_tach_count, rotation_count) where state is the current state of the motors;, tach_count is the number of counts since the last reset of the motor counter (the reset occurs when Mindstorm.Motor.set is issued);, block_tach_count is the current position relative to the last programmed movement., rotation_count is the program-relative position counter relative to the last reset of the rotation sensor for motor p.
get_device_info [Mindstorm]
get_device_info conn returns some informations about the brick connected through conn.
get_state [Mindstorm.Sensor.Ultrasonic]
get_state us get the current state of the ultrasonic sensor us.
get_status [Mindstorm.Sensor]
get_status conn port returns the number of bytes ready to be read.

I
in_channel_length [Mindstorm]
in_channel_length ch returns the length of the channel ch.
input [Mindstorm]
input ch buf ofs len reads a block of data of length len from the channel ch and write it to buf starting at position ofs.
iter [Mindstorm.Find]
iter f fpatt iterates f name size on all the filenames matching the pattern fpatt (see Mindstorm.Find.patt for the accepted patterns).

K
keep_alive [Mindstorm]
keep_alive conn returns the current sleep time limit in milliseconds.

M
make [Mindstorm.Sensor.Ultrasonic]
make conn port initialize the sensor on port port as being an ultrasonic one.
map [Mindstorm.Find]
map f fpatt maps f name size on all the filenames matching the pattern fpatt and return the list formed of those.

N
name [Mindstorm.Program]
Return the name of the current program or raise Mindstorm.Error(No_program) if no program is running.
next [Mindstorm.Find]
Execute a new request to the brick to retrieve the next filename matching the pattern.

O
open_in [Mindstorm]
open_in conn fname opens the file named fname on the brick for reading.
open_out [Mindstorm]
open_out conn flag fname opens the file fname for writing.
output [Mindstorm]
output ch buf ofs len ouputs the substring buf.[ofs .. ofs+len-1] to the channel fd.

P
patt [Mindstorm.Find]
Find.patt conn fpatt returns an iterator listing the filenames mathing the pattern fpatt.
play [Mindstorm.Sound]
play_soundfile conn file plays the sound file named file.
play_tone [Mindstorm.Sound]
play_tone conn freq duration play a tone with freq Hz lasting duration miliseconds.
poll_command [Mindstorm]
Reads bytes from the low-speed or high-speed buffer.
poll_length [Mindstorm]
Returns the number of bytes for a command in the low-speed buffer or the high-speed buffer (0 = no command is ready).

R
read [Mindstorm.Message]
read conn box returns the message from the inbox box on the NXT.
read [Mindstorm.Sensor]
Read data from from lowspeed I2C port (e.g.
remove [Mindstorm]
remove conn fname remove the file fname from the brick.
reset_pos [Mindstorm.Motor]
reset_pos conn p resets the rotation count (given by the rotation_count field of Mindstorm.Motor.get) of the motor connected to port p.
reset_scaled [Mindstorm.Sensor]
reset_scaled conn port

S
set [Mindstorm.Sensor.Ultrasonic]
Ultrasonic.set us cmd set the state or parameters for the ultrasonic sensor us.
set [Mindstorm.Sensor]
set conn p ty m set the sensor connected to port p to type ty and mode m.
set [Mindstorm.Motor]
set conn p st sets the state of the motor connected to the port p to st.
set_brick_name [Mindstorm]
set_brick_name conn name change the name to which one is connected through conn to name.
speed [Mindstorm.Motor]
speed s returns a state where speed is s, motor_on is true if and only if s <> 0, and run_state = `Running.
start [Mindstorm.Program]
start_program conn pgm starts the program named pgm.
stop [Mindstorm.Sound]
Stop the current playback.
stop [Mindstorm.Program]
stop_program conn stops the currently running program if any.

W
write [Mindstorm.Message]
write conn box msg writes the message msg to the inbox box on the NXT.
write [Mindstorm.Sensor]
write conn port data writes data to lowspeed I2C sensor connected to the port.