https://github.com/sahilkhanna/esp-idf-dotstar-led-lib
ESP-IDF based Dotstar LED library
https://github.com/sahilkhanna/esp-idf-dotstar-led-lib
dotstar esp-idf esp32 rgb rgb-led spi
Last synced: 9 months ago
JSON representation
ESP-IDF based Dotstar LED library
- Host: GitHub
- URL: https://github.com/sahilkhanna/esp-idf-dotstar-led-lib
- Owner: sahilkhanna
- License: mit
- Created: 2019-06-05T13:06:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T12:31:26.000Z (about 7 years ago)
- Last Synced: 2025-04-12T14:00:07.119Z (over 1 year ago)
- Topics: dotstar, esp-idf, esp32, rgb, rgb-led, spi
- Language: C
- Size: 6.47 MB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP-IDF DOT-STAR LED Library
Tested on AWS ESP32 Lanyard made by [Accumulatos](https://github.com/accumulatos/lanyard/blob/master/hardware/%5BACC-AWSLY1%5D%20The%20AWS%20ESP32%20Lanyard%20SCHEMATICS%2026.11.2017.pdf) for [APA102-2020](https://www.adafruit.com/product/3341) type LED.

## Installation
Copy "dotstar" directory under components folder and paste it in your project's components directory.
Include it in your main.c file.
``` C
#include "../components/dotstar/include/dotstar.h"
```
## Basic Usage
Call the init function to assign the correct IO pins and to setup number of LEDs.
``` C
init_led(LED_SDA,LED_CLK,TOTAL_LEDS,DOTSTAR_RGB);
```
Use __setPixelColor()__ or __setPixel24bitColor()__ to set color to individual LEDs in a strip of LEDs.
``` C
setPixelColor(led_index,r,g,b);
setPixel24bitColor(led_index, color);
```
Finally call the following function to display the color on LEDs.
``` C
printLED();
```