Plasma 2040 strip flicker

My long APA102 strip (connected to Plasma 2040 and running the demo rainbow Python script) flickers towards the end.

This post suggests that capacitance between the clock and data lines of the long stop may be the culprit, and suggests lowering the SPI clock frequency.

I’d like to try that, but can’t figure out how. I’ve tried searching for Plasma 2040 Python API docs but all I can find is this:

Any tips? I don’t know C and am a Python noob.


Perhaps I need to switch to circuitpython? I think it looks like the dotstar API might allow me to set the clock rate, plus I found a rainbow example for circuitpython.

Will try to figure out how to use circuitpython later and report back.

led_strip.start(FPS) maybe?
pimoroni-pico/micropython/modules/plasma at main · pimoroni/pimoroni-pico (

@alphanumeric thanks for suggestion. I tried led_strip.start(FPS) and it looks like it only changes the frequency of flushing the buffer, but no the SPI clock speed.

Looking at plasma.cpp it seems like there are more undocumented arguments which can passed to the constructor. So I added 10 MHz on the end and now it works perfectly.

led_strip = plasma.APA102(NUM_LEDS, 0, 0, plasma2040.DAT, plasma2040.CLK, 10000000)

Digging further, it looks like the default frequency is 20MHz. I guess that explains it.

static const uint DEFAULT_SERIAL_FREQ = 20 * 1000 * 1000; // 20MHz

Nice sleuthing, and thanks for posting the solution. =)