Reference   Language | Libraries | Comparison | Changes

Arduino_MKRENV : ENV class

Illuminance()

Description

Read the light sensor’s value.

Syntax

ENV.Illuminance(unit)

Parameters

FOOTCANDLE - the value returned is a float and uses footcandle as unit.
METERCANDLE - the value returned is a float and uses metercandle as unit.
LUX - the value returned is a float and uses lux as 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.