Difference between revisions of "Firmware-72 Function-123"

From I-CubeX Wiki
Jump to: navigation, search
Line 12: Line 12:
 
|0..127
 
|0..127
 
|Angular Velocity [-512..511]; a signed two’s complement 16-bit value, representing degrees/second, sent as two 8-bit bytes (MSB, LSB)
 
|Angular Velocity [-512..511]; a signed two’s complement 16-bit value, representing degrees/second, sent as two 8-bit bytes (MSB, LSB)
|Angular Velocity [0..127] or [0..16384]; an unsigned 7-bit or 14-bit value, where 0 represents -512 degrees per seconds and 127 or 16383 represents 511 degrees/second, sent as one or two 8-bit bytes (LSB, MSB)
+
|Angular Velocity [0..127] or [0..16384]; an unsigned 7-bit or 14-bit value, where 0 represents -512 degrees/second and 127 or 16383 represents 511 degrees/second, sent as one or two 8-bit bytes (LSB, MSB)
 
|}
 
|}
  

Revision as of 22:57, 1 January 2016

MOVEALONG (123, 7Bh)

The MoveAlong function enables output of the MoveAlong sensor data in both host and stand-alone mode. In host mode the sensor data is output in I2C DATA messages. In stand-alone mode the sensor data is output according to the stand-alone mode settings of the input number that equals the I2C port number. There are no methods to select, ie. the FUNCTION command’s method/parameter FP is ignored:

MoveAlong v1.0

FP Data output in host mode Data output in standalone mode
0..127 Angular Velocity [-512..511]; a signed two’s complement 16-bit value, representing degrees/second, sent as two 8-bit bytes (MSB, LSB) Angular Velocity [0..127] or [0..16384]; an unsigned 7-bit or 14-bit value, where 0 represents -512 degrees/second and 127 or 16383 represents 511 degrees/second, sent as one or two 8-bit bytes (LSB, MSB)

Example:

In order to enable the MoveAlong function to get the angular velocity data from an MoveAlong sensor with I2C device address 0 (default MoveAlong I2C device address) connected to the 7th I2C port, the following message is sent:

240, 125, 0 {DEV}, 8 {FUNCTION}, 6 {yyy = 6}, 1 {device address}, 122 {MoveAlong function}, 0 {angular velocity method}, 247 (F0h, 7Dh, 00h, 08h, 06h, 01h, 7Bh, 00h, F7h)

In host mode raw sensor data will be output immediately in I2C DATA messages. In stand-alone mode a suitable configuration has to be set using the EDIT CONFIG command before any MIDI messages will be output. The sensor parameter’s raw values as output in a I2C DATA message are offset and scaled so as to fit in the channel voice MIDI value range of either 0-127 (eg. control-change message) or 0-16383 (pitch-bend message).

Other settings of the MoveAlong sensor can be effectuated by using I2C commands such as I2C WRITE and I2C READ.