Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 697 Bytes

README.md

File metadata and controls

33 lines (21 loc) · 697 Bytes

APA102C

A simple driver for APA102C LEDs using the TI SimpleLink platform.

How to use

  1. Set up SPI device using SysConfig or board file according to hardware and SDK.

  2. Add the colorUtil library and SimpleLink SDK in your include path.

  3. Build and add this library to your project

  4. Use:

#define CONFIG_SPI_0 [INDEX OF SPI DEVICE FROM STEP 0]
#define LED_COUNT 9

#include <apa102c.h>

*pLeds = new APA102C(CONFIG_SPI_0, LED_COUNT);

// make all leds red

rgbColorFloat color = {1.0f, 0.0f, 0.0f};
pLeds->setAllLeds(color);
pLeds->output();

// or set a single LED green, full brightness:

FloatLed led = {1.0f, 0.0f, 1.0f, 0.0f};
pLeds->setLed(led, 0);
pLeds->output();