❌ ❌ ❌ ❌ ❌ ❌ ✅

NXT Light Sensor

../_images/nxtdevice-light.png
S1light sensoron
class LightSensor(port)

LEGO® MINDSTORMS® NXT Color Sensor.

Parameters:

port (Port) – Port to which the sensor is connected.

light sensorambient light
ambient() → int: %

Measures the ambient light intensity.

Returns:

Ambient light intensity, ranging from 0% (dark) to 100% (bright).

light sensorreflected light
reflection() → int: %

Measures the reflection of a surface using a red light.

Returns:

Reflection, ranging from 0% (no reflection) to 100% (high reflection).