/FastLed_WS2801_test.ino Secret
Last active
September 11, 2015 15:52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// How many leds in your strip? | |
#define NUM_LEDS 122 | |
// Data pin that led data will be written out over | |
#define DATA_PIN 2 | |
// Clock pin only needed for SPI based chipsets when not using hardware SPI | |
#define CLOCK_PIN 3 | |
#define COLOR_ORDER RGB | |
// Define the array of leds | |
CRGB leds[NUM_LEDS]; | |
void setup() { | |
FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS); | |
} | |
void loop() { | |
// Rotate colors (R -> G -> B) | |
LEDS.showColor(CRGB(255, 0, 0)); | |
delay(500); | |
LEDS.showColor(CRGB(0, 255, 0)); | |
delay(500); | |
LEDS.showColor(CRGB(0, 0, 255)); | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment