NXT_ReadIOMap
Reads the IO map of the given module ID
Contents
Syntax
bytes = NXT_ReadIOMap(mod_id, offset, n_bytes)
bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle)
Description
bytes = NXT_ReadIOMap(mod_id, offset, n_bytes) returns the data bytes of the module identified by the given module ID mod_id. The total number of bytes is determined by n_bytes and the position of the first byte index by the offset parameter.
bytes = NXT_ReadIOMap(mod_id, offset, n_bytes, handle) sends the IO map read command over the specific NXT handle (e.g. serial handle (PC) / file handle (Linux)).
If no NXT handle is specified the default one (COM_GetDefaultNXT) is used.
For more details see the official LEGO Mindstorms communication protocol.
Examples
OutputModuleID = 131073 bytes = NXT_ReadIOMap(OutputModuleID, 0, 29);
handle = COM_OpenNXT('bluetooth.ini');
OutputModuleID = 131073
SoundModuleID = 524289, 0, 30, handle);
See also
NXT_WriteIOMap, COM_GetDefaultNXT,
Signature
- Author: Alexander Behrens (see AUTHORS)
- Date: 2008/05/22
- Copyright: 2007-2010, RWTH Aachen University