Plasma 2350 W and APA102 LEDs

After success with Wireless Plasma Kit (Pico W Aboard), I got a Plasma 2350 W as it supports APA102 as well as WS2812.

Nothing installed on it so I loaded plasma2350-v0.0.11-pimoroni-micropython.uf2.

I can get previous code working with WS2812 but attempts to use APA102 are defeating me.

Examples show

# APA102 / DotStar™ LEDs
# led_strip = plasma.APA102(NUM_LEDS, 0, 0, plasma2040.DAT, plasma2040.CLK)

# WS2812 / NeoPixel™ LEDs
led_strip = plasma.WS2812(NUM_LEDS, 0, 0, plasma.plasma2040.DAT, color_order=plasma.COLOR_ORDER_BGR)

But it fails to run when changing to APA102 with NameError: name ‘plasma2040’ isn’t defined

Also, why is the order of the connectors on the board not conventional? Clock and Data are swapped.

Cheers,
Kelvin

There is a plasma. name missing from the commented method call; just compare it to the active call in your code snippet.

You’re right, it needed the plasma. - I’d missed from plasma import plasma_stick that the example had used so I added from plasma import plasma2040

It worked…after swapping the Clock and Data wires back. I have a 4-wire LED strip which is not actually APA102 but SK9822 and I discovered that whilst they are compatible they are not the same. The Plasma 2350 W board connectors are correct for APA102, but SK9822 swaps the Clock and Data, i.e. 5V, Clock, Data, Ground. Of course, they both use the same 4-wire connectors…‘all the same wires but not necessarily in the same order!’ See comparison

Now happily triggering the LED string with MQTT messages.

Where is the plasma module/API documented?

Cheers,
Kelvin

There is a bit of documentation on the module page for Plasma.

Thank you!

Cheers,
Kelvin