nanovm.nibo.drivers
Class Leds

java.lang.Object
  extended by nanovm.nibo.drivers.Leds

public class Leds
extends java.lang.Object

Provides methods to control the LEDs.


Field Summary
static int FRONT_LEFT
           
static int FRONT_RIGHT
           
static int GREEN
           
static int LEFT
           
static int LEFT_FRONT
           
static int MAXIMUM_BRIGHTNESS
           
static int MINIMUM_BRIGHTNESS
           
static int OFF
           
static int ORANGE
           
static int RED
           
static int RIGHT
           
static int RIGHT_FRONT
           
 
Constructor Summary
Leds()
           
 
Method Summary
static int getDisplaylight()
          get brightness of the display LEDs
static int getHeadlights()
          get brightness of the headlight LEDs
static int getStatus(int led)
          get color of a given status LED
static void setDisplaylight(int brightness)
          set brightness for the display LEDs
static void setHeadlights(int brightness)
          set brightness for the headlight LEDs
static void setStatus(int led, int color)
          set color for a given status LED
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT

public static final int LEFT
See Also:
Constant Field Values

LEFT_FRONT

public static final int LEFT_FRONT
See Also:
Constant Field Values

FRONT_LEFT

public static final int FRONT_LEFT
See Also:
Constant Field Values

FRONT_RIGHT

public static final int FRONT_RIGHT
See Also:
Constant Field Values

RIGHT_FRONT

public static final int RIGHT_FRONT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

OFF

public static final int OFF
See Also:
Constant Field Values

GREEN

public static final int GREEN
See Also:
Constant Field Values

RED

public static final int RED
See Also:
Constant Field Values

ORANGE

public static final int ORANGE
See Also:
Constant Field Values

MINIMUM_BRIGHTNESS

public static final int MINIMUM_BRIGHTNESS
See Also:
Constant Field Values

MAXIMUM_BRIGHTNESS

public static final int MAXIMUM_BRIGHTNESS
See Also:
Constant Field Values
Constructor Detail

Leds

public Leds()
Method Detail

setStatus

public static void setStatus(int led,
                             int color)
set color for a given status LED

Parameters:
led - id of the status LED
color - color for the status LED

getStatus

public static int getStatus(int led)
get color of a given status LED

Parameters:
led - id of the status LED
Returns:
color of the status LED

setHeadlights

public static void setHeadlights(int brightness)
set brightness for the headlight LEDs

Parameters:
brightness - 0 for dark 1023 for maximum brightness

getHeadlights

public static int getHeadlights()
get brightness of the headlight LEDs

Returns:
0 for dark 1023 for maximum brightness

setDisplaylight

public static void setDisplaylight(int brightness)
set brightness for the display LEDs

Parameters:
brightness - 0 for dark 1023 for maximum brightness

getDisplaylight

public static int getDisplaylight()
get brightness of the display LEDs

Returns:
0 for dark 1023 for maximum brightness