Yes, there is a way to get it going with Micropython on a Pico over SPI.
Load the micropython-dotstar.py to the Pico.
The example script has one fault:
spi = SPI(0,sck=Pin(6), mosi=Pin(7), miso=Pin(4)) # Configure SPI - note: miso is unused
You have to add 0 or 1 after the bracket to specify the SPI Channel (0 or 1) you use.
The pin 23 on the Blinkt! Module goes to Pico SPIO TX (Mosi, GPIO 7= Pin 10), Pin 24 Blinkt Clock goes to Pico SPIO SC (SC, GPIO 6= Pin 9); Miso has to be defined correct, but is not used.
Alternatively you can use SPI 1 with the appropriate Pins.
Demo added:
import time
import random
import micropython_dotstar as dotstar
from machine import Pin, SPI
yellow = (255, 250, 0)
mustard = (255, 219, 88)
orange = (255, 50, 0)
green = (0, 255, 0)
sea = (46, 139, 87)
grass = (124, 252, 0)
blue = (0, 0, 255)
electric = (125, 249, 255)
cyan = (0,255,255)
red = (255, 0, 0)
red1 = (128,0,0)
cobalt = (0, 71, 171)
# On-board DotStar for the TinyPICO
spi = SPI(0,sck=Pin(6), mosi=Pin(7), miso=Pin(4)) # Configure SPI - note: miso is unused
dots = dotstar.DotStar(spi, 8, brightness=0.4)
# Using a DotStar Digital LED Strip with 30 LEDs connected to SPI
# dots = dotstar.DotStar(spi=SPI(sck=Pin(x), mosi=Pin(y)), 30, brightness=0.2)
# HELPERS
# a random color 0 -> 224
def random_color():
return random.randrange(0, 7) * 32
# MAIN LOOP
n_dots =8
#len(dots)
while True:
# Fill each dot with a random color
for dot in range(n_dots):
dots[0] = (red)
dots[1] = (blue)
dots[2] = (green)
dots[3] = (cyan)
dots[4] = (cobalt)
dots[5] = (grass)
dots[6] = (0x191970)
#dots[2] = (random_color(), random_color(), random_color())
#dots[3] = (random_color(), random_color(), random_color())
time.sleep(.25)