|
upm
0.4.0
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the SparkFun* RGB RingCoder. More...
RGB RingCoder is a breakout board, a circular LED containing 16 LEDs arranged in a ring, and a rotary encoder. The encoder contains an RGB LED as well as a push button function.
The device requires 11 pins, 3 of which must be PWM-capable (for the RGB LEDs).
Public Member Functions | |
| RGBRingCoder (int en, int latch, int clear, int clk, int dat, int sw, int encA, int encB, int red, int green, int blue) | |
| ~RGBRingCoder () | |
| void | setRingLEDS (uint16_t bits) |
| bool | getButtonState () |
| int | getEncoderPosition () |
| void | clearEncoderPosition () |
| void | setRGBLED (float r, float g, float b) |
| RGBRingCoder | ( | int | en, |
| int | latch, | ||
| int | clear, | ||
| int | clk, | ||
| int | dat, | ||
| int | sw, | ||
| int | encA, | ||
| int | encB, | ||
| int | red, | ||
| int | green, | ||
| int | blue | ||
| ) |
RGBRingCoder constructor
| en | Enables GPIO |
| latch | Latch GPIO |
| clear | Clears GPIO |
| clk | Clock GPIO |
| dat | Data out GPIO |
| sw | Push button switch GPIO |
| encA | Encoder A GPIO |
| encB | Encoder B GPIO |
| red | RGB red LED PWM |
| green | RGB green LED PWM |
| blue | RGB blue LED PWM |
| ~RGBRingCoder | ( | ) |
RGBRingCoder destructor
1.8.9.1