void segment(int zahl) {

  ClearLED();

  switch (zahl) {
    case 0:
      leds[2] = CRGB::Blue; // Segment A
      leds[3] = CRGB::Blue; // Segment F
      leds[4] = CRGB::Blue; // Segment E
      leds[5] = CRGB::Blue; // Segment D
      leds[6] = CRGB::Blue; // Segment C
      leds[1] = CRGB::Blue; // Segment B
      break;
    case 1:
      leds[1] = CRGB::Blue; // Segment B
      leds[6] = CRGB::Blue; // Segment C
      break;
    case 2:
      leds[2] = CRGB::Blue; // Segment A
      leds[1] = CRGB::Blue; // Segment b
      leds[0] = CRGB::Blue; // Segment G
      leds[7] = CRGB::Blue; // Segment G
      leds[4] = CRGB::Blue; // Segment E
      leds[5] = CRGB::Blue; // Segment D
      break;
    case 3:
      leds[2] = CRGB::Blue; // Segment A
      leds[1] = CRGB::Blue; // Segment B
      leds[0] = CRGB::Blue; // Segment G
      leds[7] = CRGB::Blue; // Segment G
      leds[6] = CRGB::Blue; // Segment C
      leds[5] = CRGB::Blue; // Segment D
      break;
    case 4:
      leds[3] = CRGB::Blue; // Segment F
      leds[0] = CRGB::Blue; // Segment G
      leds[7] = CRGB::Blue; // Segment G
      leds[6] = CRGB::Blue; // Segment C
      leds[1] = CRGB::Blue; // Segment b
      break;
    case 5:
      leds[2] = CRGB::Blue; // Segment A
      leds[3] = CRGB::Blue; // Segment F
      leds[0] = CRGB::Blue; // Segment G
      leds[7] = CRGB::Blue; // Segment G
      leds[6] = CRGB::Blue; // Segment C
      leds[5] = CRGB::Blue; // Segment D
      break;
    case 6:
      leds[2] = CRGB::Blue; // Segment A
      leds[3] = CRGB::Blue; // Segment F
      leds[0] = CRGB::Blue; // Segment G
      leds[7] = CRGB::Blue; // Segment G
      leds[6] = CRGB::Blue; // Segment C
      leds[5] = CRGB::Blue; // Segment D
      leds[4] = CRGB::Blue; // Segment E
      break;
    case 7:
      leds[2] = CRGB::Blue; // Segment A
      leds[1] = CRGB::Blue; // Segment B
      leds[6] = CRGB::Blue; // Segment C
      break;
    case 8:
      leds[0] = CRGB::Blue; // Segment G
      leds[1] = CRGB::Blue; // Segment F
      leds[2] = CRGB::Blue; // Segment A
      leds[3] = CRGB::Blue; // Segment F
      leds[4] = CRGB::Blue; // Segment E
      leds[5] = CRGB::Blue; // Segment D
      leds[6] = CRGB::Blue; // Segment C
      leds[7] = CRGB::Blue; // Segment G
      break;
    case 9:
      leds[0] = CRGB::Blue; // Segment G
      leds[1] = CRGB::Blue; // Segment F
      leds[2] = CRGB::Blue; // Segment A
      leds[3] = CRGB::Blue; // Segment F
      leds[5] = CRGB::Blue; // Segment D
      leds[6] = CRGB::Blue; // Segment C
      leds[7] = CRGB::Blue; // Segment G
      break;
  }
}

void ClearLED() {
  for (int dot = 0; dot < NUM_LEDS; dot++) {
    leds[dot] = CRGB::Black;
  }
}
