smallin/my_led

1.0.0

Latest
uploaded 6 days ago
LED component

readme

# MyLed组件

- 一个控制LED的组件

```
#include "esp_log.h"
#include "my_led.h"

#define TAG "MAIN"

extern "C" void app_main(void)
{
    MyLed led12(GPIO_NUM_12);
    MyLed led13(GPIO_NUM_13);

    led12.StartContinuousBlink();


    led13.EnableBrightnessAdjust(true, LEDC_CHANNEL_1, LEDC_TIMER_1);
    // led13.StartContinuousBlink(500);
    led13.SetBrightness(7);

    while(1) {
        vTaskDelay(pdMS_TO_TICKS(10*1000));
        led13.SetBrightness(0);
        led12.TurnOn();
    }
}

```

Links

Supports all targets

License: Apache 2.0

To add this component to your project, run:

idf.py add-dependency "smallin/my_led^1.0.0"

or download archive

Stats

  • Archive size
    Archive size ~ 6.08 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

smallin/my_led version: 1.0.0
|