Reference   Language | Libraries | Comparison | Changes

Arduino_MKRENV : ENV class

readIlluminance()

Description

Read the light sensor’s value.

Syntax

ENV.readIlluminance(unit)

Parameters

FOOTCANDLE - the value returned is a float value and uses footcandle as the unit.
METERCANDLE - the value returned is a float value and uses metercandle as the unit.
LUX - the value returned is a float value and uses lux as the unit (default).

Returns

The light sensor’s value in the unit selected.

Example


Serial.print("Lux .       = ");
Serial.println(ENV.readIlluminance());

See Also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.