Grove - Light Sensor v1.2

The Grove - Light Sensor v1.2 is updated version of Grove - Light Sensor 1.0 which is aimed at measuring light levels in daily life. It is an analog module and output various electrical signals which can be converted to different ranges(that depends on the Analog-to-Digital-Converter on your controller board. For example, it will output 0-255 for an 8-bit ADC). It integrates a high-sensitive and reliable phototriode, and is interfaced with Grove port which will save you a lot of work in the wiring.

Version Tracker

Product reversion Release date Support status Notes
Grove - Light Sensor 1.0 April 28 2013‎ Supported
Version 1.2(current version) Dec 2015 Supported



Operating voltage(V) 3 volts-5 volts
Operating current(mA) 0.5 mA-3 mA
Response time 20-30 milliseconds
Peak Wavelength 540 nm
Phototriode LS06-MΦ5(datasheet)
Weight 4 g

Note you can get more Information about light level(illumination) in daily life here.

Hardware Overview

Grove interface
Connect main control board such as Seeeduino board with driver board.
Sensor to light

Get Started

This part will show you some basic examples as a hint for applications on different development board families.

With Arduino

Material required


Flash example code

1. Copy code below to Arduino IDE editor.
/* Grove - Light Sensor demo v1.2
* signal wire to A0.
* By:
#include <math.h>
const int ledPin=9;                 //Connect the LED Grove module to Pin12, Digital 12
const int thresholdvalue=10;         //The threshold for which the LED should turn on. 
float Rsensor; //Resistance of sensor in K
void setup() {
  Serial.begin(9600);                //Start the Serial connection
  pinMode(ledPin,OUTPUT);            //Set the LED on Digital 12 as an OUTPUT
void loop() {
  int sensorValue = analogRead(0); 
  Serial.println("the analog read data is ");
  Serial.println("the sensor resistance is ");
  Serial.println(Rsensor,DEC);//show the light intensity on the serial monitor;
2. You will see readings.

With RasberryPi

Material required


Flash example code

1. Create a file Copy code below
# GrovePi+ & Grove Light Sensor & LED
import time
import grovepi
# Connect the Grove Light Sensor to analog port A0
light_sensor = 0
# Connect the LED to digital port D4
led = 4
# Turn on LED once sensor exceeds threshold resistance
threshold = 10
while True:
        # Get sensor value
        sensor_value = grovepi.analogRead(light_sensor)
        # Calculate resistance of sensor in K
        resistance = (float)(1023 - sensor_value) * 10 / sensor_value
        if resistance > threshold:
            # Send HIGH to switch on LED
            # Send LOW to switch off LED
        print "sensor_value =", sensor_value, " resistance =", resistance
    except IOError:
        print "Error"

Run the program

2. Find the path to the file(According to your own path)
   cd GrovePi/Software/Python/
3. Run Program
sudo python

More applications


Copyright (c) 2008-2016 Seeed Development Limited ( /
This static html page was created from