Home » DEVELOPERS » Programming the MRduino with Arduino » proxSensor() – API arduino

proxSensor()

Description

Read the proximity infrared sensors from the specified sensor.

Syntax

proxSensor(sensor)

Parameter

sensor : the sensor number (1 to 6)

Returns

Distance value: int (0 to 4095)

Exemples

# read proximity sensor n°1
distance1 = proxSensor(1);
# read proximity sensor n°6
distance6 = proxSensor(6);