upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the Grove Circular LED module. More...

Detailed Description

This is a circular LED ring based on the MY9221 chip. It is often used with a rotary encoder and has 24 controllable LEDs.

grovecircularled.jpg

Public Member Functions

synchronized void delete ()
 
 GroveCircularLED (short di, short dcki)
 
int setLevel (short level, boolean direction)
 
int setLevel (short level)
 
int setSpinner (short position)
 
int setStatus (boolean[] status)
 
String name ()
 

Constructor & Destructor Documentation

GroveCircularLED ( short  di,
short  dcki 
)

Instantiates an MY9221 object

Parameters
diData pin
dckiClock pin

Member Function Documentation

String name ( )

Returns the name of the component

int setLevel ( short  level,
boolean  direction 
)

Sets the lighting status

Parameters
levelSelected level for the circular LED (0-24)
directionUp or down; up is true and default
int setSpinner ( short  position)

Sets the spinner (lights up all the other LEDs but one)

Parameters
positionSelected position for the spinner (0-23)
int setStatus ( boolean[]  status)

Sets the lighting status

Parameters
statusBoolean array (24 elements)

The documentation for this class was generated from the following file: