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

From I-CubeX Wiki
Jump to: navigation, search
Line 31: Line 31:
 
:240, 125, 0 {DEV}, 8 {FUNCTION}, 6 {yyy = 6}, 32 {device address}, 121 {Moist function}, 4 {all parameters}, 247 (F0h, 7Dh, 00h, 08h, 06h, 20h, 79h, 04h, F7h)
 
:240, 125, 0 {DEV}, 8 {FUNCTION}, 6 {yyy = 6}, 32 {device address}, 121 {Moist function}, 4 {all parameters}, 247 (F0h, 7Dh, 00h, 08h, 06h, 20h, 79h, 04h, 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).
+
In host mode raw sensor data will be output immediately in [[Firmware-72_Message-010 |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 Moist sensor can be effectuated by using I2C commands such as I2C WRITE and I2C READ.
 
Other settings of the Moist sensor can be effectuated by using I2C commands such as I2C WRITE and I2C READ.

Revision as of 17:43, 3 November 2015

MOIST (121, 79h)

The Moist function enables output of the Moist sensor data in both host and stand-alone mode. In host mode the sensor data is output as an I2C DATA message. 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. Since the Moist has multiple output parameters, the stand-alone mode settings are incremented by one for each extra output parameter. The following methods can be selected using the FUNCTION command’s method/parameter FP:

Moist v1.0

FP Data output
1 Soil Moisture [0..512]; an unsigned 16-bit value sent as two 8-bit bytes (MSB, LSB)
2 Illumination [0..65536]; an unsigned 16-bit value sent as two 8-bit bytes (MSB, LSB)
3 Temperature [0..512]; an unsigned 16-bit value, where 512 represents 51.2 degrees Celsius, sent as two 8-bit bytes (MSB, LSB)
4 Soil Moisture, Illumination, Temperature; unsigned 16-bit values each sent as two 8-bit bytes (MSB, LSB)

There are no calibration factors available for the Soil Moisture and Illumination values, ie. it is not known what is represented by each value.


Example:

In order to enable the Moist function to get all sensor data from a Moist sensor with I2C device address 32 (default Moist I2C device address) connected to the 7th I2C port, the following message is sent:

240, 125, 0 {DEV}, 8 {FUNCTION}, 6 {yyy = 6}, 32 {device address}, 121 {Moist function}, 4 {all parameters}, 247 (F0h, 7Dh, 00h, 08h, 06h, 20h, 79h, 04h, 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 Moist sensor can be effectuated by using I2C commands such as I2C WRITE and I2C READ.