Closed ThePureCC closed 8 months ago
The method of use is correct. Maybe there is no entry if.
strip.setBrightness(bright); //This function did not trigger any action. strip.setAllLedsColorData(255, 255, 255); //This function is needed to trigger the setup. strip.show();
/***** Function code ****/ void Freenove_ESP32_WS2812::setBrightness(u8 brightness) { br = constrain(brightness, 0, 255); }
esp_err_t Freenove_ESP32_WS2812::setLedColorData(int index, u8 r, u8 g, u8 b) { u8 p[3]; p[rOffset] = r br / 255; p[gOffset] = g br / 255; p[bOffset] = b * br / 255; return set_pixel(index, p[0], p[1], p[2]); }
I have a bunch of codes that looks like this to change the brightness:
however it doesn't seem to change the brightness at all.
Is the brightness setting only able to be set at start? Would it be possible to change brightness dynamically?