#include <FastLED.h>
#define LED_PIN 6
#define NUM_LEDS 21
// SEGMENTS
// 0 - A
// 1 - B
// 2 - C
// 3 - D
// 4 - E
// 5 - F
// 6 - G
int SEGMENTS[7][3] = {{0,1,2},{3,4,5},{6,7,8},{9,10,11},{12,13,14},{15,16,17},{18,19,20}};
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
set_segment(0, CRGB(255, 0, 0));
FastLED.show();
}
void set_segment(int segment_id, CRGB data) {
int segment_leds[3] = {};
segment_leds = SEGMENTS[segment_id];
for(int i = 0; i < 3; i++) {
leds[segment_leds[i]] = data;
}
}