Skip to content

Latest commit

 

History

History
109 lines (59 loc) · 7.27 KB

nxt-light-sensor.md

File metadata and controls

109 lines (59 loc) · 7.27 KB

NXT Light Sensor

{>> Non-Visible component<<}

Category Requires Version
LEGO® MINDSTORMS® > NXT API 21, Android 5.0 Lollipop 1

Overview

A component that provides a high-level interface to a light sensor on a LEGO MINDSTORMS NXT robot.

Events

Above Range

Light level has gone above the range.

Below Range

Light level has gone below the range.

Within Range

Light level has gone within the range.

Methods

Get Light Level

Returns: Number

Returns the current light level as a value between 0 and 1023, or -1 if the light level can not be read.

Properties

Above Range Event Enabled

Boolean Default: FalseRead Write - Designer Blocks

Whether the AboveRange event should fire when the light level goes above the TopOfRange.

Below Range Event Enabled

Boolean Default: FalseRead Write - Designer Blocks

Whether the BelowRange event should fire when the light level goes below the BottomOfRange.

Bluetooth Client

ComponentWrite - Designer

The BluetoothClient component that should be used for communication.

Bottom Of Range

Number Default: 256Read Write - Designer Blocks

The bottom of the range used for the BelowRange, WithinRange, and AboveRange events.

Generate Light

Boolean Default: FalseRead Write - Designer Blocks

Whether the light sensor should generate light.

Sensor Port

Text Default: 3Write - Designer

The sensor port that the sensor is connected to.

Top Of Range

Number Default: 767Read Write - Designer Blocks

The top of the range used for the BelowRange, WithinRange, and AboveRange events.

Within Range Event Enabled

Boolean Default: FalseRead Write - Designer Blocks

Whether the WithinRange event should fire when the light level goes between the BottomOfRange and the TopOfRange.