Grove - Red LED

Grove - Red LED is similar to the Grove - LED module in that it houses an LED light source. In addition, it also has a potentiometer on-board to manage the power requirements of the LED. The PCB of this module has mounting holes using which it can be mounted on the required surface for your prototype. For example, it can be easily used as a pilot lamp for indicating power or signal presence.

Features

Usage

Follow these steps to build a sample circuit using this module:

  1. Connect the LED module to the output side of your circuit (to the right of the power module). On the input side of the circuit, you may use a range of sensor based input modules (Grove - Light Sensor, Grove - Sound Sensor, Grove - Button or Grove - Slide Potentiometer).
  2. Power up the circuit.
  3. The LED will turn ON when the input module supplies a trigger:
  • If using with a momentary switch like the one on the Grove - Button module, simply press the button to turn ON the LED:
  • If using with a Grove - Slide Potentiometer, move the slider from the GND position to VCC and see how the brightness of the LED increases as the supplied voltage increases.
  • If using with a Grove - Light Sensor connected directly to the input side of the circuit, you should see the LED turn ON in bright light and turn OFF in the dark. If you want the LED to turn ON only in the dark, add a Grove - NOT module between the light sensor and the power module.

You can use either the Grove - USB Power module or the Grove - DC Jack Power module for the Grove circuit when using in standalone mode (without MCU). When used in conjunction with an MCU board such as an Arduino or Seeeduino and a Grove - Base Shield, the power is supplied to the circuit through the microcontroller board and there is no need to use any Grove Power Module.

With Raspberry Pi

Connect the LED to Port D4 and power on the Raspberry Pi, using the Grove wire connector.This is a test to make led blinking.You can connect to GrovePi+ with it as the picture below.

# GrovePi LED Blink example

import time
from grovepi import *

# Connect the Grove LED to digital port D4
led = 4

pinMode(led,"OUTPUT")
time.sleep(1)

while True:
    try:
        #Blink the LED
        digitalWrite(led,1)		# Send HIGH to switch on LED
        time.sleep(1)

        digitalWrite(led,0)		# Send LOW to switch off LED
        time.sleep(1)

    except KeyboardInterrupt:	# Turn LED off before stopping
        digitalWrite(led,0)
        break
    except IOError:				# Print "Error" if communication error encountered
        print "Error"

Run The Program

   cd GrovePi/Software/Python/
   sudo python grove_led_blink.py

Availability

This Grove module is available as part of the following Grove Kit Series:

The Grove Mixer Pack uses the Grove - LED module.
Alternatively, it can be bought stand-alone here at the Seeed Studio Bazaar.

Resources

Copyright (c) 2008-2016 Seeed Development Limited (www.seeedstudio.com / www.seeed.cc)
This static html page was created from http://www.seeedstudio.com/wiki