Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

LEGO::NXT::Constants
Low-level constants for the Direct Commands API.

LEGO::NXT::Constants - Low-level constants for the Direct Commands API.


NAME

LEGO::NXT::Constants - Low-level constants for the Direct Commands API.


SYNOPSIS


  use LEGO::NXT::Constants;


DESCRIPTION

This module exports a bunch of constants in to your namespace for you to use with the various low-level methods in the the LEGO::NXT manpage module.


CONSTANTS

All of the following constants are exported in to your namespace by default.

RET and NORET

For each request of the NXT, you must specify whether you want the NXT to send a return value.


 $NXT_RET

 $NXT_NORET

Use $NXT_RET only when you really need a return value as it does have some overhead because it has do do a second request to retrieve response data from NXT and then parses that data.

IO Port


  $NXT_SENSOR1

  $NXT_SENSOR2

  $NXT_SENSOR3

  $NXT_SENSOR4

  

  $NXT_MOTOR_A

  $NXT_MOTOR_B

  $NXT_MOTOR_C

  $NXT_MOTOR_ALL

Motor Control

Output mode:


  $NXT_MOTOR_ON

  $NXT_BRAKE

  $NXT_REGULATED

Output regulation modes:


  $NXT_REGULATION_MODE_IDLE

  $NXT_REGULATION_MODE_MOTOR_SPEED

  $NXT_REGULATION_MODE_MOTOR_SYNC

Output run states:


  $NXT_MOTOR_RUN_STATE_IDLE

  $NXT_MOTOR_RUN_STATE_RAMPUP

  $NXT_MOTOR_RUN_STATE_RUNNING

  $NXT_MOTOR_RUN_STATE_RAMPDOWN

Sensor Type


  $NXT_NO_SENSOR

  $NXT_SWITCH

  $NXT_TEMPERATURE

  $NXT_REFLECTION

  $NXT_ANGLE

  $NXT_LIGHT_ACTIVE

  $NXT_LIGHT_INACTIVE

  $NXT_SOUND_DB

  $NXT_SOUND_DBA

  $NXT_CUSTOM

  $NXT_LOW_SPEED

  $NXT_LOW_SPEED_9V

  $NXT_NO_OF_SENSOR_TYPES

Sensor Mode


  $NXT_RAW_MODE

  $NXT_BOOLEAN_MODE

  $NXT_TRANSITION_CNT_MODE

  

  $NXT_PERIOD_COUNTER_MODE

  $NXT_PCT_FULL_SCALE_MODE

  

  $NXT_CELSIUS_MODE

  $NXT_FAHRENHEIT_MODE

  

  $NXT_ANGLE_STEPS_MODE

  $NXT_SLOPE_MASK

  $NXT_MODE_MASK

Op Codes

Generally you will not need to use these constants since the LEGO::NXT manpage provides easy to use wrappers around all of these actions.


  $NXT_START_PROGRAM

  $NXT_STOP_PROGRAM

  $NXT_PLAY_SOUND_FILE

  $NXT_PLAY_TONE

  $NXT_SET_OUTPUT_STATE

  $NXT_SET_INPUT_MODE

  $NXT_GET_OUTPUT_STATE

  $NXT_GET_INPUT_VALUES

  $NXT_RESET_SCALED_INPUT_VALUE

  $NXT_MESSAGE_WRITE

  $NXT_RESET_MOTOR_POSITION

  $NXT_GET_BATTERY_LEVEL

  $NXT_STOP_SOUND_PLAYBACK

  $NXT_KEEP_ALIVE

  $NXT_LSGET_STATUS

  $NXT_LSWRITE

  $NXT_LSREAD

  $NXT_GET_CURRENT_PROGRAM_NAME

  $NXT_MESSAGE_READ


CONTRIBUTORS

Aran Deltac <bluefeet@cpan.org>


LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy