Created
January 30, 2018 04:08
-
-
Save marschr/033d195158c36718d6d811701343750e to your computer and use it in GitHub Desktop.
Big Led 2
This file contains hidden or 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" | |
#define NUM_LEDS_PER_STRIP 107 | |
CRGB leds[NUM_LEDS_PER_STRIP]; | |
void setup() { | |
FastLED.addLeds<WS2812, 3, GRB>(leds, NUM_LEDS_PER_STRIP); | |
FastLED.addLeds<WS2812, 5, GRB>(leds, NUM_LEDS_PER_STRIP); | |
} | |
void loop() { | |
// bpm(); | |
potato(); | |
} | |
void potato(){ | |
for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) { | |
leds[i] = CRGB::Red; // set our current dot to red | |
FastLED.show(); | |
leds[i] = CRGB::Black; // set our current dot to black before we continue | |
} | |
} | |
void bpm() | |
{ | |
// colored stripes pulsing at a defined Beats-Per-Minute (BPM) | |
uint8_t BeatsPerMinute = 62; | |
CRGBPalette16 palette = PartyColors_p; | |
uint8_t beat = beatsin8( BeatsPerMinute, 64, 255); | |
for( int i = 0; i < NUM_LEDS_PER_STRIP; i++) { //9948 | |
leds[i] = CRGB::Red; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment