Light Sensor (LM358)
Last updated
Last updated
The Grove Light sensor integrates a photoresistor (light dependent resistor) to detect the intensity of light. The resistance of photoresistor decreases when the intensity of light increases. A dual OpAmp chip LM358 on board produces a voltage corresponding to the intensity of light (based on resistance value). The output signal is an analog value. When the light is brighter, the value becomes larger. Please check the official WiKi for details.
Download the sketch file for the light sensor example.
Open the downloaded Light_Sensor.ino with the Arduino IDE.
Modify line 20 from 1023 to 4095 to fit the 12-bit ADC output of LinkIt 7697, for example:
Click the Upload icon to compile and upload the sketch file to the board.
Open the serial monitor (with baud rate 9,600) and reset the board to execute the application. You should be able to see the output as below: