Created
February 16, 2024 18:40
-
-
Save esmarr58/f84f733d143dbd2905623ec5107e4cd8 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> | |
#define NUM_LEDS 1 | |
#define DATA_PIN 15//8__15 | |
#define CLOCK_PIN 13 | |
CRGB leds[NUM_LEDS]; | |
void setup() { | |
FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); | |
} | |
int hue = 0; | |
void loop(){ | |
for(int i = 0; i < NUM_LEDS; i++) { | |
leds[i] = CHSV(hue + i*255/NUM_LEDS , 255, 255); | |
} | |
FastLED.show(); | |
delay(20); | |
hue += 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment