API for the Grove Circular LED module.
More...
This is a circular LED ring based on the MY9221 chip. It is often used with a rotary encoder and has 24 controllable LEDs.
int level = 0;
while (shouldRun)
{
level = (level + 1) % 24;
usleep(100000);
}
|
static const int | LEDS_PER_INSTANCE = 12 |
|
virtual void | lockData () |
|
virtual void | send16bitBlock (uint16_t data) |
|
bool | m_autoRefresh |
|
uint16_t | m_lowIntensity |
|
uint16_t | m_highIntensity |
|
unsigned int | m_instances |
|
uint16_t * | m_bitStates |
|
uint16_t | m_commandWord |
|
mraa::Gpio | m_gpioClk |
|
mraa::Gpio | m_gpioData |
|
Instantiates an GroveCircularLED object
- Parameters
-
dataPin | Data pin |
clockPin | Clock pin |
void setSpinner |
( |
uint8_t |
position | ) |
|
Sets the spinner (turns off all LEDs but selected one)
- Parameters
-
position | Selected position for the spinner (0-23) |
void setLevel |
( |
uint8_t |
level, |
|
|
bool |
direction = true |
|
) |
| |
Sets the lighting status
- Parameters
-
level | Selected level for the circular LED (0-23) |
direction | Up or down; up is true and default |
The documentation for this class was generated from the following files:
- /iotdk/jenkins/workspace/upm-doc-stable/src/my9221/grovecircularled.h
- /iotdk/jenkins/workspace/upm-doc-stable/src/my9221/grovecircularled.cxx