Control simple battery powered led closet light

So, I had this idea to hack the led lights I’ve been using in my pumpkins the last few years with an ESP8266. They are super cheap battery powered LED closet lights that run off of 3 AAAs.

I’d love to be able to use simple effects like fire flicker or fade on and off and generally control them over wifi with WLED and an ESP8266q

There is a tiny resistor that runs between the positive and the ground on the circuit board the leds are mounted to that has 4 bands, brown, black red and brown. I connected one of these lights to an ESP8266 running WLED by connecting the positive (red) wire to the data pin and the ground pin to GND on the board. I powered the board through USB for testing purposes.

I’m guessing this is not the proper way to connect these together because the solid effect made them flash 2x a second. Can anyone help me figure this out.

And before the comments start flowing in about “just get some WS2812 rings”, just stop! I know I can use addressable RGB rings and I know how to do that. I want to know if what I want to do is possible with the hardware I already have.

Thanks in advance for the help.

Connecting the pos to the data pin? That’s why they flash as the flashing is data signals sent out from the ESP. I’d guess you won’t get any joy from these, regarding effects anyway as they are just “dumb” white led’s! No doubt I’ll be corrected if I’m wrong!

After some research, it looks like what I want to do is possible through PWM but I’m not sure where to look to set this up. Any suggestions?

There is support for “analog” LEDs, which is what it sounds like you want, but overkill for single-color LEDs like that. It can be done with an analog build and driver transistor.

I found the solution. Thanks Tonyno. I compiled my own analog build and it does exactly what I want it to do. There are a few adjustments to make in the color pallete to make it work better with the effects, namely changing the colors to white, black, and white.