NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
int ReadSensorColorEx ( const byte &  port,
int &  colorval,
unsigned int &  raw[],
unsigned int &  norm[],
int &  scaled[] 
)
inline

Read LEGO color sensor extra.

This function lets you read the LEGO color sensor. It returns the color value, and three arrays containing raw, normalized, and scaled color values for red, green, blue, and none indices.

Parameters
portThe sensor port. See Input port constants.
colorvalThe color value. See Color values.
rawAn array containing four raw color values. See Color sensor array indices.
normAn array containing four normalized color values. See Color sensor array indices.
scaledAn array containing four scaled color values. See Color sensor array indices.
Returns
The function call result.
Warning
This function requires an NXT 2.0 compatible firmware.
Examples:
ex_ReadSensorColorEx.nxc.