grove.grove_led

This is the code for

Examples

import time
from grove.grove_led import GroveLed

# connect to pin 5(slot D5)
PIN   = 5
led = GroveLed(PIN)

while True:
    led.on()
    time.sleep(1)
    led.off()
    time.sleep(1)

Classes

class grove.grove_led.GroveLed(pin)[source]

Class for Grove - XXXX Led

Parameters:

pin (int) – number of digital pin the led connected.

Inheritance

digraph inheritanceca911669c3 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "GPIO" [URL="grove.gpio.gpio_rpi.html#grove.gpio.gpio_rpi.GPIO",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "GroveLed" [URL="#grove.grove_led.GroveLed",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class for Grove - XXXX Led"]; "GPIO" -> "GroveLed" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
off()[source]

light off the led

on()[source]

light on the led

class grove.grove_led.GPIO(pin, direction=None)[source]

Inheritance

digraph inheritance90c23bfb1c { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "GPIO" [URL="grove.gpio.gpio_rpi.html#grove.gpio.gpio_rpi.GPIO",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; }