# Micropython ESP32 Lesson 2.7 Twinkling Lights

**URL:** https://forum.sunfounder.com/t/micropython-esp32-lesson-2-7-twinkling-lights/4271
**Category:** General
**Created:** [January 15, 2026, 8:46pm UTC](https://forum.sunfounder.com/t/micropython-esp32-lesson-2-7-twinkling-lights/4271 "2026-01-15T20:46:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Sparkn](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@Sparkn](https://forum.sunfounder.com/u/Sparkn)
#### Post date: [January 15, 2026, 8:46pm UTC](https://forum.sunfounder.com/t/micropython-esp32-lesson-2-7-twinkling-lights/4271/1 "2026-01-15T20:46:31Z")

</div>

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.
