Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define NUM_STRIPS 8
- #define NUM_LEDS_PER_STRIP 10
- #define IngressoA 5
- #define IngressoB 18
- #define IngressoC 19
- #define cRed CRGB( 255, 0, 0)
- #define cGreen CRGB( 0, 255, 0)
- #define cBlue CRGB( 0, 0, 255)
- #define CorrezzioneBianco CRGB( 255, 255, 255)
- #define Luminosita 50 // Luminosita Massima (255)
- eSegmenti.h"
- #include "FastLED.h"
- FASTLED_USING_NAMESPACE
- #define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS
- #define LED_TYPE WS2812
- CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];
- void setup() {
- FastLED.addLeds<LED_TYPE, 13>(leds, 0, NUM_LEDS_PER_STRIP);
- #if NUM_STRIPS > 1
- FastLED.addLeds<LED_TYPE, 12>(leds, NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 2
- FastLED.addLeds<LED_TYPE, 14>(leds, 2 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 3
- FastLED.addLeds<LED_TYPE, 27>(leds, 3 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 4
- FastLED.addLeds<LED_TYPE, 26>(leds, 4 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 5
- FastLED.addLeds<LED_TYPE, 25>(leds, 5 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 6
- FastLED.addLeds<LED_TYPE, 33>(leds, 6 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #if NUM_STRIPS > 7
- FastLED.addLeds<LED_TYPE, 32>(leds, 7 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);
- #endif
- #ifdef Luminosita
- FastLED.setBrightness( Luminosita );
- #endif
- #ifdef CorrezzioneBianco
- FastLED.setTemperature( CorrezzioneBianco );
- #endif
- for(int i = 0; i < NUM_LEDS; i++) leds[i] = CRGB::Red;
- }
- void loop() {
- // for(int i = 0; i < NUM_LEDS; i++) leds[i] = cRed;
- // for(int i = 0; i < NUM_LEDS; i++) leds[i] = cGreen;
- for(int i = 0; i < NUM_LEDS; i++) leds[i] = cBlue;
- FastLED.show();
- delay(100);
- for(int i = 0; i < NUM_LEDS; i++) leds[i] = CRGB::Black;
- FastLED.show();
- delay(100);
- }
Add Comment
Please, Sign In to add comment