WingScreen

From Noisebridge
Revision as of 11:55, 11 September 2014 by UNDO (talk | contribs) (C O L O R S w/hsv)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A side wing for teh screen

                                               /---------\
                                               |         |
                                  RGB LEDs --  *         |
                                           \   |         |
            .__                             -  *         |
    __  _  _|__| ____    ____                  |         |
    \ \/ \/ /  |/    \  / ___\                 *         |
     \     /|  |   |  \/ /_/  >                |         |
      \/\_/ |__|___|  /\___  /                 *         |
                    \//_____/                  |         |
   ('''' .|'', '||''| .|''|, .|''|, `||''|,    *         |
    `'') ||     ||    ||..|| ||..||  ||  ||    |         |
   `...' `|..' .||.   `|...  `|...  .||  ||.   *         |
                                               |         |
                                               *         |
                                               |         |
                                               *         |
                                               |         |
                                               *         |
                                               |         |
                      /---------\              *         |
                      |  micro  |              |         |
   USB-----|~|--------|  puter  |              *         |
                      \---------/              |         |
                             \                 *         |
                              \----------------|         |
                                               \---------/

StripHSV

Rainbeau test sketch for strip of addressable RGB LEDs.

Requires http://fastled.io/ library.

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 12

// Spacing between pixel/color
#define HSV_PAD 22

// Delay between cycles
#define LOOP_DELAY 20

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 11
// #define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

byte count = 0;

void setup() { 
      // Uncomment/edit one of the following lines for your leds arrangement.
      FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
      
      // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<NEOPIXEL, DATA_PIN, RGB>(leds, NUM_LEDS);

      // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      
      FastLED.setBrightness(64);
}

void loop() { 
  // Rainbeau
  for (int i = 0; i < NUM_LEDS; i++)
  {
    leds[i] = CHSV(count + (i * HSV_PAD), 255, 255);
  }
  FastLED.show();
  
  count++;
  
  delay(LOOP_DELAY);
}