User Manual V3.1
Element14 | element14.com/minode 12
Electrical Characteristics
Photoresistor (light intensity is 10lux)
Threshold hysteresis ΔUth
Block API:
Obtaining the Light Level
The light sensor module divides brightness into five distinct levels, 1 – 5, with one being
the brightest and five being the most dull.
Function
LightSensorGetLevel(connName: AnalogConnName): number;
Parameters
‘ConnName’ is the analog connector's name.
Light Sensing Event
This function is used to check the light level periodically and then execute the associated
code block whenever the light level changes.
Function
onLightSensorEvent(connName: AnalogConnName, body: () => void): void;
Parameters
‘ConnName’ is the analog connector's name.
EXAMPLE:
Display Light Level