Skip to content

jasaw/build-lights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-lights

Continuous Integration build lights controller.

Monitors Jenkins CI and provides visual indication of the build status via LED strip.

Features:

  • Monitors Jenkins web API directly.
  • Monitors Jenkins via AWS SQS.
  • Plays sound when build finishes.
  • Automatically divides LEDs to each build.

build-lights

Hardware

You'll need:

The Pi is fitted with a polyfuse at the USB 5V rail. You'll need to tap the 5V from the input side of the polyfuse.

pre-polyfuse 5V

top

Refer to images in build-lights/docs. When soldering the 4-pin JST SM Plug to the LED strip, make sure to solder it on the input side of the strip (input is marked with DI, CI). If you want protection for the Pi SPI pins, include the schmitt trigger buffer along the 2 SPI lines and power the buffer from the 5V that was tapped earlier (before the polyfuse).

Software

You'll need:

  • Your favourite Pi distro, as long as there is userspace access to spidev (e.g. /dev/spidev0.0). If you don't have a favourite distro, check out this minimal Raspbian install: https://github.com/jmattsson/raspbian_base
  • Python 2.7

Installation

First of all, get the build-lights source.

$ git clone https://github.com/jasaw/build-lights.git

If using AWS/SQS you'll need to:

$ git clone git://github.com/boto/boto.git
$ cd boto
$ sudo python setup.py install

You'll need to install AWS/SQS plugin on Jenkins too: https://github.com/jkelabora/snsnotify-plugin

If you want to play sounds (mp3's only):

$ sudo apt-get update
$ sudo apt-get install alsa-utils
$ sudo apt-get install mpg321

If you are using device-tree, enable SPI driver from raspi-config.

raspi-config

otherwise you'll need to add "spi-bcm2708" to /etc/modules to automatically load the SPI driver on boot.

Assuming you have a standard setup of 32 lights connected to spidev0.0, you can test the lights by running (as root):

$ cd build-lights/lights
$ python test.py

Create config.json based on one of the sample files in build-lights/config/

Test it by running build-lights/light_controller in the foreground first (as root).

Copy build-lights/scripts/build-lights to /etc/init.d/build-lights

To automatically start on boot (as root):

$ insserv /etc/init.d/build-lights

To remove automatically start on boot (as root):

$ insserv -r /etc/init.d/build-lights

About

Continuous Integration build light controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published