Skip to content

Instantly share code, notes, and snippets.

View adammhaile's full-sized avatar

Adam Haile adammhaile

View GitHub Profile
#! /bin/bash
# Clone needed repos
pushd /home/pi
git clone https://github.com/adammhaile/AnimatedGifs.git
git clone https://github.com/adammhaile/DisplayGraphics.git
git clone https://github.com/ManiacalLabs/HT1632_Serial.git
git clone https://github.com/adammhaile/BiblioPixelProjects.git
git clone https://github.com/ManiacalLabs/BiblioPixelAnimations.git
pushd ./BiblioPixelAnimations
{
"animation": {
"typename": "BiblioPixelAnimations.strip.Rainbows.RainbowCycle"
},
"run": {
"fps": 30
},
"driver": {
"num": 240,
"typename": "pi_ws281x",
#include "FastLED.h"
FASTLED_USING_NAMESPACE
// FastLED "100-lines-of-code" demo reel, showing just a few
// of the kinds of animation patterns you can quickly and easily
// compose using FastLED.
//
// This example also shows one easy way to define multiple
// animations patterns and have them automatically rotate.
@adammhaile
adammhaile / remote_demo.json
Created July 9, 2017 01:01
BP Remote Demo
{
"driver": {
"typename": "simpixel",
"num": 256
},
"layout": {
"typename": "matrix",
"width": 16,
"height": 16
#include <SmartMatrix3.h>
#include <EEPROM.h>
#define FIRMWARE_VER 2
namespace CMDTYPE
{
enum CMDTYPE
{
SETUP_DATA = 1,
{
"driver": {
"typename": "bibliopixel.drivers.serial.Serial",
"ledtype": "GENERIC",
"num": 1024,
"hardwareID": "16C0:0483"
},
"layout": {
"typename": "matrix",
import os, shutil
from . import config, files
GIT_NOT_FOUND = """Unable to find the `git` command!
In order to use the git functionality, you must have the `git` binary installed.
Please follow the instructions here to install:
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
"""
# build kvm image
docker build https://github.com/BBVA/kvm.git -t bbva/kvm:latest
# generate cloud-init init.iso
genisoimage -output /tmp/init.iso -volid cidata -joliet -rock ./user-data ./meta-data
# download latest atomic qcow image
curl https://ci.centos.org/artifacts/fedora-atomic/rawhide/images/latest-atomic.qcow2 --output /tmp/latest-atomic.qcow2
# run the KVM container with atomic qcow
@adammhaile
adammhaile / Porting.md
Last active March 1, 2023 04:56
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

@adammhaile
adammhaile / SK9822.py
Created May 1, 2017 23:18
SK9822 BiblioPixel Driver
from spi_driver_base import DriverSPIBase, ChannelOrder
class DriverSK9822(DriverSPIBase):
"""Main driver for SK9822 based LED strips on devices like the Raspberry Pi and BeagleBone"""
def __init__(self, num, c_order=ChannelOrder.RGB, use_py_spi=True, dev="/dev/spidev0.0", SPISpeed=2):
super(DriverSK9822, self).__init__(num, c_order=c_order,
use_py_spi=use_py_spi, dev=dev, SPISpeed=SPISpeed)