Skip to content

Instantly share code, notes, and snippets.

@tomoinn
tomoinn / rainbow_strip.cc
Created July 10, 2013 18:49
A bit of code to demonstrate the light strip from insomnialighting.com here - http://www.insomnialighting.com/catalog/index.php?main_page=product_info&cPath=6_4&products_id=8 using an arduino nano. Data and clock lines on the strip are connected to pins 11 and 13 of the nano respectively to make use of hardware SPI.
#include "LPD8806.h"
#include "SPI.h"
// Simple test for 260 (5 meters) of LPD8806-based RGB LED strip, this is a
// modified version of the original demo - it creates a rainbow, animates it
// and fades from black->colours->white->colours->black in a cycle, holding
// somewhat longer on the full colour, all while cycling the rainbow colours.
// This has been tested with a high density (260 LEDs / 5m) strip and a nano
// board, running from a 5V 10A PSU.