NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char NXTLineLeaderAverage ( const byte &  port,
const byte &  i2caddr 

Read NXTLineLeader average.

Read the mindsensors NXTLineLeader device's average value. The average is a weighted average of the bits set to 1 based on the position. The left most bit has a weight of 10, second bit has a weight of 20, and so forth. When all 8 sensors are over a black surface the average will be 45. The port must be configured as a Lowspeed port before using this function.

portThe sensor port. See NBC Input port constants.
i2caddrThe sensor I2C address. See sensor documentation for this value.
The NXTLineLeader average value.