Micropython ESP32 Lesson 2.7 Twinkling Lights

I the original project, the LED strip lights an LED and then turns it off while turning the next one on. For a small string of lights, this is all you have to do give them a quick and dirty twinkle with the exact same code.

Take the line that turns off the pixel and comment it out like this:

    # pixels[i] = (0, 0, 0)

Next, take the time delay and lower to speed the action up a bit. This will give them the appearance of twinkling! Adjust the time delay for your own preference. This is mine:

    time.sleep_ms(20)

If you did something different, share it, please. Maybe you removed the for loop altogether and just chose a random light. Maybe you dimmed the lights so they weren’t as bright. I’d like to see your take on it.