Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define LED_STRIP_PIN 14
- #define STRIP_NUM_LEDS 5
- CRGB strip[STRIP_NUM_LEDS];
- #define LED_RING_PIN 10
- #define RING_NUM_LEDS 12
- CRGB ring[RING_NUM_LEDS];
- #define BRIGHTNESS 64
- #define LED_TYPE WS2812
- #define COLOR_ORDER GRB
- void setup() {
- // put your setup code here, to run once:
- FastLED.addLeds<NEOPIXEL, LED_STRIP_PIN>(strip, STRIP_NUM_LEDS);
- FastLED.addLeds<NEOPIXEL, LED_RING_PIN>(ring, RING_NUM_LEDS);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- for (int i=0; i<RING_NUM_LEDS*STRIP_NUM_LEDS; i++){
- strip[i % STRIP_NUM_LEDS]= CRGB::Red;
- ring[i % RING_NUM_LEDS]= CRGB::Red;
- FastLED.show();
- strip[i % STRIP_NUM_LEDS]= CRGB::Black;
- ring[i % RING_NUM_LEDS]= CRGB::Black;
- delay(100);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement