NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
unsigned int ColorSensorValue ( byte  port,
byte  color 
)
inline

Read a LEGO color sensor scaled value.

This function lets you directly access a specific LEGO color sensor scaled value. Both the port and the color index must be constants.

Parameters
portThe sensor port. See Input port constants.
colorThe color index. See Color sensor array indices.
Returns
The scaled value.
Warning
This function requires an NXT 2.0 compatible firmware.
Examples:
ex_ColorSensorValue.nxc.