1. light sensor [index] light intensity detected

Light Sensor - 图1

Reports the ambient light intensity detected by the specified light sensor

How to Use

Light sensors can be used to detect the intensity of the ambient light.
A greater value indicates a higher intensity.
The number in this block indicates the place of a ight sensor among the ones connected to Halocode. As shown in the following
figure, the number 1 indicates the first light sensor connected to Halocode, 2 indicates the second one, and so on.

Light Sensor - 图2
You can select the check box on the left of this block to see the ambient light intensity detected by the light sensor on the stage.
Note: This is a reporter block that must be used in combination with another block requiring data.

Example

Light Sensor - 图3

When you press the space key, the first LED matrix connected to Halocode displays the ambient light intensity detected by the light sensor.
Note: Ensure that you have connected an LED matrix to Halocode.