Read a mindsensors device value.
Read a one, two, or four byte value from a mindsensors sensor. The value must be stored with the least signficant byte (LSB) first (i.e., little endian). Returns a boolean value indicating whether or not the operation completed successfully. The port must be configured as a Lowspeed port before using this function.
- Parameters
-
port | The sensor port. See Input port constants. |
i2caddr | The sensor I2C address. See sensor documentation for this value. |
reg | The device register to read. |
numbytes | The number of bytes to read. Only 1, 2 or 4 byte values are supported. |
- Returns
- The function call result.
- Examples:
- ex_MSReadValue.nxc.