项目作者: sahilkhanna

项目描述 :
ESP-IDF based Dotstar LED library
高级语言: C
项目地址: git://github.com/sahilkhanna/esp-idf-dotstar-led-lib.git
创建时间: 2019-06-05T13:06:59Z
项目社区:https://github.com/sahilkhanna/esp-idf-dotstar-led-lib

开源协议:MIT License

下载


ESP-IDF DOT-STAR LED Library

Tested on AWS ESP32 Lanyard made by Accumulatos for APA102-2020 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.

  1. #include "../components/dotstar/include/dotstar.h"

Basic Usage

Call the init function to assign the correct IO pins and to setup number of LEDs.

  1. 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.

  1. setPixelColor(led_index,r,g,b);
  2. setPixel24bitColor(led_index, color);

Finally call the following function to display the color on LEDs.

  1. printLED();