“I already have the Plasma2040. This version adds UART, which is helpful to control the device from outside. I don't think I need the additional power of the 2350, but it is cheaper anyways.”
“Having a blast experimenting with my LED strip, MicroPython, and Plasma Stick! I decided to share my code with the community — check it out here: https://github.com/st235/MicroLED”
“Very easy to get working.
I have a 1m 60 LED strip. I just wired it up and then followed the tutorials. Note: Plasma 2040 mostly work. I already knew Python so MicroPython was straightforward for me. (The Thonny IDE is pretty basic compared to the pro one I am used to, but it did the job.) Also, I was not able to find the API spec for the `plasma` Python package so I could not see all the things it could do.
I was hoping my 11 year old son would take an interest because it is pretty cool to see how very simple programs can create awesome effects. Alas, it cannot compete with Fortnite though!
Here's a sample program that has three RGB "slugs" moving at random speeds with addative colour mixing when they overlap. You can even use classes with magic methods!
```
import plasma
from plasma import plasma2040
import time
import random
NUM_LEDS = 60
led_strip = plasma.WS2812(NUM_LEDS, 0, 0, plasma2040.DAT)
led_strip.start()
class Colour:
def __init__(self, r=0, g=0, b=0):
self.r = r
self.g = g
self.b = b
def __add__(self, val):
return Colour(self.r + val.r, self.g + val.g, self.b + val.b)
def show(values):
for i in range(NUM_LEDS):
c = values[i]
led_strip.set_rgb(i, c.r, c.g, c.b)
class Slug:
def __init__(self, position=0.0, length=10, speed=1.0):
self.position = position
self.length = length
self.speed = speed
def step(self):
self.position += self.speed
if self.position + self.length > NUM_LEDS:
self.speed = -self.speed
self.position = NUM_LEDS - self.length
if self.position < 0:
self.speed = -self.speed
self.position = 0
slugs = [
(Slug(random.randint(0, NUM_LEDS-10), 10, random.uniform(0.5, 1.5)), Colour(255, 0, 0)),
(Slug(random.randint(0, NUM_LEDS-10), 10, random.uniform(0.5, 1.5)), Colour(0, 255, 0)),
(Slug(random.randint(0, NUM_LEDS-10), 10, random.uniform(0.5, 1.5)), Colour(0, 0, 255)),
]
while True:
values = [Colour() for _ in range(NUM_LEDS)]
for slug, colour in slugs:
for i in range(slug.length):
n = int(slug.position) + i
values[n] += colour
slug.step()
show(values)
time.sleep(0.02)
```”
“Driving two 8x8 arrays. Pushing the recommended pixel count but I figure if I keep them dim no smoke gets out.
Using the freshly working MicroPython, thanks Gadgetoid!”
“I have had great success with the Plasma 2040 and this is even better. I asked for more GPIO pins and they are there on the SP/CE connector. Happy to sacrifice button B for that. So more performance, more memory and more i/o. Add in software support from Pimoroni if you need it. This is a brilliant (ha!) little board for working with WS2812 pixel strips.
The 4-star rating shown in some places was my finger trouble. My intended rating is 5-star all the way.”