Difference between revisions of "WingScreen"

From Noisebridge
Jump to: navigation, search
(introducing...)
 
(C O L O R S w/hsv)
Line 29: Line 29:
 
                               \----------------|        |
 
                               \----------------|        |
 
                                               \---------/
 
                                               \---------/
 +
</pre>
 +
 +
== StripHSV ==
 +
Rainbeau test sketch for strip of addressable RGB LEDs.
 +
 +
Requires http://fastled.io/ library.
 +
 +
<pre>
 +
#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);
 +
}
 
</pre>
 
</pre>

Revision as of 18:55, 11 September 2014

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);
}