Measure ambient light level in lux (lx)
Simulink Support Package for Android Devices / Sensors
Use the Light Sensor block to measure ambient light in lux (lx) from the light sensor on the Android® device.
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Port_1 — Ambient light data
The block outputs the ambient light in lux (lx).
Sample time — Time interval of sampling
0.1 (default) | nonnegative scalar
Specify a discrete time interval, in seconds, at which the block reads the light sensor of the device and outputs the data.
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.
Introduced in R2014a