GroveLight Class
- ID: grovelight
- Name: Light Sensor
- Category: light
- Manufacturer: seeed
- Connection: analog
- Kit: gsk
The Grove light sensor detects the intensity of the ambient light. As the light intensity of the environment increases, the resistance of the sensor decreases. This means the raw value from the analog pin is larger in bright light and smaller in the dark. An approximate lux value can also be returned.
Item Index
Methods
Methods
GroveLight
(
Number
-
pin
Grove analog light sensor constructor
Parameters:
-
pin
NumberAnalog pin to use
Returns:
Number:
raw_value
()
Number
Gets the raw value from the AIO pin
Returns:
Number:
Raw value from the ADC
value
()
Number
Gets an approximate light value, in lux, from the sensor
Returns:
Number:
Normalized light reading in lux