Light Sensor
Measure ambient light
Library
Simulink Support Package for Android Devices / Sensors
Description
Get the ambient light measurement in lux (lx) from the light sensor on the Android™ device.
The block port outputs a single
—precision
value.
The light sensor is located near the front camera and device display. The device typically uses this sensor for automatic adjustment of the screen brightness.
Note
During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation.
Parameters
- Sample time
Specify how often the block reads the sensor.
Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.