led module

class led.LED(red_pin, green_pin, blue_pin)[source]

Wrap an RGB LED

Defines a number of colours to display

Parameters:
  • red_pin – The pin the Red LED is attached to
  • green_pin – The pin the Green LED is attached to
  • blue_pin – The pin the Blue LED is attached to
BLUE = 3
CYAN = 5
GREEN = 2
MAGENTA = 6
OFF = 0
RED = 1
WHITE = 7
YELLOW = 4

Blink the LED on with the specified colour for a given time

Parameters:
  • t – Time to blink (ms)
  • colour – The colour to show. Must be an int.
off()[source]

Turn the LED off

on(colour=7)[source]

Turn the LED on with the specified colour

Parameters:colour – The colour to show. Must be an int.