Arduino_MKRENV - readIlluminance()
Read the light sensor’s value.
Syntax
ENV.readIlluminance(unit)
Parameters
- unit: FOOTCANDLE to get the light value in footcandle, METERCANDLE to get the light in metercandle and LUX to get the light value in lux (default).
Returns
The light sensor’s value as float in the specified unit.
Example
Serial.print("Lux = ");
Serial.println(ENV.readIlluminance());
See also