Merge pull request #18 from dmadison/clock-pin

Clock Pin Support (4-Wire LEDs)
This commit is contained in:
David Madison 2018-10-18 19:00:04 -04:00 committed by GitHub
commit fece9c9b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -25,12 +25,13 @@
static const uint16_t
Num_Leds = 80; // strip length
static const uint8_t
Led_Pin = 6, // Arduino data output pin
Brightness = 255; // maximum brightness
// --- FastLED Setings
#define LED_TYPE WS2812B // led strip type for FastLED
#define COLOR_ORDER GRB // color order for bitbang
#define PIN_DATA 6 // led data output pin
//#define PIN_CLOCK 7 // led data clock pin (uncomment if you're using a 4-wire LED type)
// --- Serial Settings
static const unsigned long
@ -122,7 +123,12 @@ void setup(){
pinMode(DEBUG_FPS, OUTPUT);
#endif
FastLED.addLeds<LED_TYPE, Led_Pin, COLOR_ORDER>(leds, Num_Leds);
#ifdef PIN_CLOCK
FastLED.addLeds<LED_TYPE, PIN_DATA, PIN_CLOCK, COLOR_ORDER>(leds, Num_Leds);
#else
FastLED.addLeds<LED_TYPE, PIN_DATA, COLOR_ORDER>(leds, Num_Leds);
#endif
FastLED.setBrightness(Brightness);
#ifdef CLEAR_ON_START

View File

@ -20,6 +20,8 @@ Open the LEDstream_FastLED file in the Arduino IDE and customize the settings at
- LED data pin
- LED type
If you are using a 4-wire LED chipset like APA102, you will need to uncomment the `PIN_CLOCK` line and set that as well.
Upload to your Arduino and use a corresponding PC application to stream color data. You can get the Processing files from the [main Adalight repository](https://github.com/adafruit/Adalight), though I would recommend using [Patrick Siegler's](https://github.com/psieg/) fork of Lightpacks's Prismatik, which you can find [here](https://github.com/psieg/Lightpack/releases).
## Additional Settings