-
-
Save focalintent/d459ef7e0bf4ce67c75428d42799e9b8 to your computer and use it in GitHub Desktop.
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> | |
struct PT { uint8_t x, y;}; | |
#define NUM_LEDS 20 | |
CRGB leds[NUM_LEDS]; | |
PT xy[] = { {5,0}, {6,1}, {7,2}, {8,3}, {9,4}, {10,5}, {9,6}, {8,7}, {7,8}, {6,9}, {5,10}, {4,9}, {3,8}, {2,7}, {1,6}, {0,5}, {1,4}, {2,3}, {3,2}, {4,1} }; | |
void setup() { | |
// ... | |
} | |
void loop() { | |
static uint8_t hue=0; | |
for(int i = 0; i < NUM_LEDS; i++) { | |
leds[i] = CHSV(hue, 192, inoise8_raw(xy[i].x << 8, xy[i].y << 8, millis())); | |
} | |
hue++; | |
FastLED.delay(1000/30); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment