Skip to content

Instantly share code, notes, and snippets.

@adammhaile
Last active March 1, 2023 04:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adammhaile/875decd10bde92ea3625502933e60062 to your computer and use it in GitHub Desktop.
Save adammhaile/875decd10bde92ea3625502933e60062 to your computer and use it in GitHub Desktop.
BiblioPixel 3.0 Release docs

Porting from BiblioPixel 2.x to 3.0

As much as possible we've tried to make BiblioPixel 3.0 as backwards compatible as possible with 2.x, so in many cases your code should just work. But there are a few things to be aware of as you get started.

Now Python 3.x only!

By far, the biggest change is that we have completely dropped Python 2 support. Inst ing BiblioPixel via pip will now fail on Python 2 unless you use pip install BiblioPixel<=3 to force it to install the older version. We support Python 3.4, 3.5, and 3.6. As with any work with python, but especially with Python 3, we highly recommend installing everything inside a virtualenv.

Base LED handlers

In BiblioPixel 2.x you could choose from LEDStrip, LEDMatrix, LEDPOV, and LEDCircle. In BiblioPixel 3.0 we've dropped the LED part and you can import the following from bibliopixel.led:

  • Strip
  • Matrix
  • Cube
  • Circle
  • POV

You can techncially still use the LED* versions, but they are deprecated, so we highly recommend updating to the new names.

Driver names

Just like the LED handlers, we've dropped Driver from the names of most drivers. So, for example, bibliopixel.drivers.serial.DriverSerial is now simply bibliopixel.drivers.serial.Serial

For the rest of the available drivers, checkout the Wiki Drivers page.

SPI Drivers

Speaking of drivers, we have overhauled the SPI (for use on devices like the Raspberry Pi) in order to consolidate all these similar outputs. Previously, if you wanted to use, for example, an APA102 LED you would have to use bibliopixel.drivers.APA102.DriverAPA102, but now all SPI drivers use the same entry point. Instead you would do the following:

from bibliopixel.drivers.SPI import SPI
driver = SPI(type='APA102', num=100)

Works with APA102, LPD8806, and WS2801 strips, and and now WS2812 strips (experimental).

Class and Method Params

Last, please note that some method and class parameters have changed, mostly from camel case (i.e. ledType) to underscores (i.e. led_type). Be sure to check the Wiki for more details.

Announcing BiblioPixel 3.0

For nearly a year, we have been working on a radical rewrite of the already popular BiblioPixel 2, our pure Python pixel animation framework, and now we are proud to finally announce the availability of that mountain of work. BiblioPixel 3.0 is faster, cleaner, stronger, happier and in every concievable way better than it's predecessor. You will go from zero to blinking lights in under a minute!

What's new? Just to name a few highlights...

  • Full Python 3.4+ support! (In fact we dropped Python 2 support)
  • Near complete core rewrite that's faster than ever!
  • Run BiblioPixel with nothing more than a config file, zero code!
  • SimPixel, our all-new WebGL based visualizer. Get started with no hardware at all!
  • Tight integration with BiblioPixelAnimations, our repository of pre-made animations.

Even with all this, it's still about 90% compatible with all your old code and only requires minimal modifications.

Get started and install now.

Welcome

BiblioPixel is a pure Python 3 library for all your LED animations needs. Through its fully output agnostic design you can write your code once and use it on a huge variety of outputs, from LED strips to cubes and even a high performance LED simulator!

New Features

BiblioPixel v3.0 is a nearly complete rewrite making it stronger, better, faster, and with many new amazing features.

  • Completely Python 3 compatible
  • Faster frame generation and hardware updates
  • Brand-new SimPixel visualizer uses WebGL to visualize lighting designs in the browser!
  • Better matrix text handling
  • Better matrix and cube layout building
  • BiblioPixel Projects - blinkin' lights with only a simple config, no code!
  • Built-in demos
  • Greatly improved base LED types along with new Circle and Cube
  • Overhauled SPI driver support
  • Support for WS2812 (NeoPixel) on the Raspberry Pi and similar
  • Many more!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment