LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual
Pages 97
Views 819
Downloads : 2 times
PDF Size : 572.7 KiB

Summary of Contents

LabVIEW LEGO MINDSTORMS NXT Module Programming Guide Manual

  • Chapter 2Extensions to LabVIEW© National Instruments Corporation2-59LabVIEW LEGO MINDSTORMS NXT ModuleNXT Button MethodUse the NXT button method to read the status of the built-in buttons on the NXT brick. Note that you can read only the top three buttons. The bottom button always aborts the program.NXTReadButtonParameters:This system call method reads the state of the built-in NXT button specified by Index (RIGHT, LEFT, or ENTER). Set Reset? to TRUE to reset Count after reading the state.If the status code is zero, Pressed returns TRUE when the button is depressed, and Count returns the number of times button has been depressed and released since last reset.If the status code is non-zero, you specified an invalid value for Index.Legal values for Index:ParameterData CodeI/O DirectionDescriptionStatus CodeI8outputUnusedIndexU8inputButton index: RIGHT, LEFT, or ENTERPressedBooleanoutputTRUE if specified button is currently depressedCountU8outputNumber of times specified button has been pressed and released since last reset.Reset?BooleaninputSet to TRUE to reset Count after reading state.ValueEnumDescription0x01RIGHTRight arrow button0x02LEFTLeft arrow button0x03ENTERCenter square button