Respository of demos?

Is there a repository of demo code somewhere? I am trying to get BiblioPixel to work, but apparantly currently I am fighting two different problems, namely Python is new to me and the whole library is new to me.

I would appreciate if there are a examples somewhere I can execute.

e.g. I see for some of the patterns there are .py files supplied, but what am I supposed to do with those files? They certainly don’t work if I try to execute with "python3 "

As I said a couple of demos would be great.

BiblioPixel has a bunch of baked-in animations that are installed at the same time. If you want to see a few you can just call bp demo at the command line and it will launch a browser window containing an animation simulator.

In general, I suggest starting here: https://maniacallabs.github.io/BiblioPixel/tutorial/index.html

Thanks, I saw those and the tutorial. Still that does not explain in simple terms what I can do with some of the supplied demo .py sources. Or I don’t see it because I am not firm in python yet. I am no stranger to programming after 40 years again around code and in code, just the whole python thing is a little bit new to me.

Would you happen to have or know of a secretion of what to do with some of the codes that are in the GitHub examples for this library?

You’re really meant to load animations from the yaml based “project” files. In which you write an animation class and then call it via the yaml project file like this:

shape: [64, 7]
animation:
  typename: $bpa.matrix.Text.ScrollText
  color: orange
  text: 'Getting Started'

But if you want to do it all in python you still can, like below:

#load the AllPixel driver. Works for Strip AND Matrix
from bibliopixel.drivers.serial import *
driver = Serial(num = 8*8, ledtype = LEDTYPE.WS2812B)

#import the bibliopixel base classes
from bibliopixel import *
from bibliopixel.animation import *
class BasicAnimTest(BaseStripAnim):
    def __init__(self, led):
        super(BasicAnimTest, self).__init__(led)
        #do any initialization here
  
    def step(self, amt = 1):
    	for i in range(8*8):
			self._led.set(i, colors.hue2rgb((i*4+self._step)%256))
        self._step += amt


#Now try with Strip
led = Strip(driver)

try:
	anim = BasicAnimTest(led)
	anim.run(fps=45)
except KeyboardInterrupt:
	#turn everything off if Ctrl+C is pressed
	led.all_off()
	led.update()

Thanks, I think that helps