Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. progga
    3. Best
    P
    • Continue chat with progga
    • Start new chat with progga
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by progga

    • RE: How use RGB LED on M5 FIRE?

      Thank you for you help,

      now I solved the problem with esp32_digital_led_lib library.

      Example:
      [CODE]
      #include "esp32_digital_led_lib.h"

      // Enumberation ob LED's
      // 9 0
      // 8 1
      // 7 2
      // 6 3
      // 5 4

      #define LED_PORT 15

      strand_t m_sLeds = {.rmtChannel = 0, .gpioNum = 15, .ledType = LED_WS2812B_V3, .brightLimit = 32, .numPixels = 10, .pixels = nullptr, ._stateVars = nullptr};

      void Led_Init(void) {
      pinMode (LED_PORT, OUTPUT);
      digitalWrite (LED_PORT, LOW);

      if(digitalLeds_initStrands(&m_sLeds, 1)) {
          E_TRACE("Can't init LED driver()\n");
      }
      
      digitalLeds_resetPixels(&m_sLeds);
      
      // Set led 7 to red
      m_sLeds.pixels[7] = pixelFromRGBW(55, 0, 0, 0);
      
      digitalLeds_updatePixels(&m_sLeds);
      

      }

      [/CODE]

      posted in FAQS
      P
      progga