Skip to content

discreetmayor/simplelink_apa102c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

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();

About

A simple APA102C LED driver for TI SimpleLink MCUs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages