NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
int SensorHTMagnet ( const byte &  port,
int  offset = 0 
)
inline

Read HiTechnic Magnet sensor.

Read the HiTechnic Magnet sensor on the specified port. The offset value should be calculated by averaging several readings with an offset of zero while the sensor is perfectly still.

Parameters
portThe sensor port. See Input port constants.
offsetThe zero offset.
Returns
The Magnet sensor reading.
Examples:
ex_SensorHTMagnet.nxc.