junius-pun/rainbow_led

1.0.0

Latest
uploaded 17 hours ago
Rainbow LED cycling

readme

# rainbow-led

This is an implementation of a rainbow LED with speed and brightness control. The BOOT button can be used to control:
- **Short press**: Power toggle
- **Long press**: Random speed and brightness

## Example

An example project is included under [`example`](./example).

## Configuration

### LED

When configuring your project, be sure to select:
- **LED module type**: `CONFIG_APP_LED_TYPE`
    - LEDC: `CONFIG_APP_LED_TYPE_LEDC=y`
    - WS2812: `CONFIG_APP_LED_TYPE_WS2812=y` (default)
- **GPIO pins**:
    - LEDC: `APP_LED_LEDC_GPIO_NUM_[R/G/B]` (default: R=0, G=1, B=8)
    - WS2812: `APP_LED_WS2812_GPIO_NUM=?` (default: 8)

Or if using `idf.py menuconfig`, then head to `Component config > App LED Control`.

### Button

If your BOOT button is non-standard, or using a different button, you should configure:
- **GPIO pin**: `CONFIG_APP_BUTTON_GPIO_NUM=?` (default: 9)
- **Active level**: `CONFIG_APP_BUTTON_IS_ACTIVE_HIGH=[y/n]` (default: y)

Or if using `idf.py menuconfig`, then head to `Component config > App Button Configuration`.

Links

Supports all targets

License: MIT

To add this component to your project, run:

idf.py add-dependency "junius-pun/rainbow_led^1.0.0"

download archive

Stats

  • Archive size
    Archive size ~ 5.67 MB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

junius-pun/rainbow_led version: 1.0.0
|