Package ve.ucv.ciens.icaro.libnxtarcontrol

This package contains a wrapper library and reference implementation of the NxtAR robot control protocol for the LejOS operating system.

See: Description

Package ve.ucv.ciens.icaro.libnxtarcontrol Description

This package contains a wrapper library and reference implementation of the NxtAR robot control protocol for the LejOS operating system.

The protocol is based on 2 byte long data messages that encode a set of motor ports, actions on those motors and the speed of the motors. The first byte encodes a set actions and motors, while the second byte contains an integer number representing the speed to set to the enabled motors. The first byte's bits encode the following data (from least significant to most significant bit):

This bits are decoded using the binary masks defined in NxtARControlProtocol. This mechanism allows to set the state or execute an action on multiple motors simultaneously. The user actions are executed using callback objects registered with the aforementioned class.

The NxtARControlProtocol class includes methods to read, decode and execute a protocol message, independently of how those messages are generated. An example would be messages read from a Bluetooth or USB stream, as well as messages generated by the application that is using the library.