nxt_sensomoto.pl -- NXT Mindstroms - Sensomoto.

author
- Piotr Hołownia
license
- GNU General Public License
nxt_connection_open
Opens connection.
nxt_connection_close
Closes connection.
nxt_motor(+Motor, +Speed)
nxt_motor(+Motor, -Speed)
Reads speed of the specified motor or rotates it at specified speed.
nxt_motor(+Motor, +Speed, +Spec)
Rotates motor forward if Speed is positive, backward if Speed is negative. Character of this rotation depends on Spec. Spec is one of:
time(+Time)
Changes motor speed for a specified time.
angle(+Angle)
Rotates motor at specified speed. Motor will stop, when specified revolution (Angle in degrees) is reached.
+ Angle
The same as angle(+Angle)
nxt_touch_sensor(+Port, -Value)
Gets touch sensor reading. Returns 1 if pressed, 0 otherwise
nxt_sound_sensor(+Port, -Value)
Gets sound sensor reading.
nxt_light_sensor(+Port, -Value)
Gets light sensor reading.
nxt_light_sensor_LED(+Port, Setting)
Sets the LED on if Setting is activate or off if passivate.
nxt_ultrasonic_sensor(+Port, -Value)
Gets ultrasonic sensor reading.
nxt_voltage(-Voltage)
Returns battery voltage in V.
nxt_voltage_millivolt(-Voltage)
Returns battery voltage in mV.
nxt_start_program(+File)
Starts a Lego executable file on the NXT. DOES NOT WORK PROPERLY!!
nxt_stop_program
Stops the currently running Lego executable on the NXT. DOES NOT WORK PROPERLY!!
nxt_play_sound_file(+File)
nxt_play_sound_file(+File, +Repeat)
Plays a sound file from the NXT. Files use the .rso extension. The filename is not case sensitive. nxt_play_sound_file/1 plays sound once. nxt_play_sound_file/2 plays sound once if Repeat is true or till nxt_stop_sound_playback is used if Repeat is false.
nxt_stop_sound_playback
Stops a sound file that has been playing/repeating.
nxt_play_tone(Frequency, Duration)
Plays tone at specified frequency.
nxt_brick_name(+Name)
nxt_brick_name(-Name)
Gets or sets the name of the brick. DOES NOT WORK PROPERLY!!