Horloge Géante

Voici un début :

#include <DS3232RTC.h>
#include <Time.h>
#include <Wire.h>
#include "FastLED.h"
#define NUM_LEDS 114 // Number of LED controls (remember I have 3 leds / controler
#define COLOR_ORDER BRG  // Define color order for your strip
#define DATA_PIN 6  // Data pin for led comunication
#define BP_START 7 // Pin bouton Start
#define BP_STOP   8 // Pin bouton Stop
#define BP_RESET 9 // Pin bouton Reset
#define INTER 10   // Pin inter 15 / 45

CRGB leds[NUM_LEDS]; // Define LEDs strip
byte digits[10][28] = {
  {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //0
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, //1
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //2
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //3
  {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}, //4
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //5
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //6
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //7
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //8
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //9 | 2D Array for numbers on 7 segment
};
bool Dot = true;  //Dot state
int ledColor = 0x0000FF; // Color used (in hex)
int Heure = 0;
bool EtatChrono = false;  // Chrono arrêté
int HeureMax = 4500;

void setup() {
  //  Serial.begin(9600);
  //  Wire.begin();
  LEDS.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); // Set LED strip type
  LEDS.setBrightness(255); // Set initial brightness
  pinMode(BP_START, INPUT_PULLUP); // bouton START
  pinMode(BP_STOP, INPUT_PULLUP); // bouton STOP
  pinMode(BP_RESET, INPUT_PULLUP); // bouton RESET
  pinMode(INTER, INPUT_PULLUP); // inter 15 / 45
}

// Check Light sensor and set brightness accordingly
void BrightnessCheck() {
  const byte sensorPin = 3; // light sensor pin
  const byte brightnessLow = 5; // Low brightness value
  const byte brightnessHigh = 255; // High brightness value
  int sensorValue = digitalRead(sensorPin); // Read sensor
  if (sensorValue == 0) {
    LEDS.setBrightness(brightnessHigh);
  }
  else {
    LEDS.setBrightness(brightnessLow);
  }
}

// Convert time to array needet for display
void TimeToArray() {
  int cursor = 0;
  int Secondes = Heure % 100;
  int Now = Heure;

  Dot = true;
  if (Secondes % 2 == 1) Dot = false;
  if (Dot) {
    leds[56] = ledColor;
    leds[57] = ledColor;
  }
  else {
    leds[56] = 0x000000;
    leds[57] = 0x000000;
  }

  for (int i = 1; i <= 4; i++) {
    int digit = Now % 10; // get last digit in time
    if (i == 1) {
      //      Serial.print("Digit 4 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 0;
      for (int k = 0; k <= 27; k++) {
        //        Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
      //      Serial.println();
    }
    else if (i == 2) {
      //      Serial.print("Digit 3 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 28;
      for (int k = 0; k <= 27; k++) {
        //        Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
      //      Serial.println();
    }
    else if (i == 3) {
      //      Serial.print("Digit 2 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 58;
      for (int k = 0; k <= 27; k++) {
        //        Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
      //      Serial.println();
    }
    else if (i == 4) {
      //      Serial.print("Digit 1 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 86;
      for (int k = 0; k <= 27; k++) {
        //        Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
      //      Serial.println();
    }
    Now /= 10;
  }
}

void MiseAJour()
{
  Heure += 1;
  if (Heure % 100 == 60) Heure = Heure + 40;
}

void LectureBoutons()
{
  int EtatBPStart = digitalRead(BP_START);
  int EtatBPStop = digitalRead(BP_STOP);
  int EtatBPReset = digitalRead(BP_RESET);
  int EtatInter = digitalRead(INTER);
  if (EtatBPStart) StartChrono ();
  if (EtatBPStop) StopChrono ();
  if (EtatBPReset) ResetChrono ();
  HeureMax = 4500;
  if (EtatInter) HeureMax = 1500;
}

void loop()  // Main loop
{
  LectureBoutons();
  if (EtatChrono)
  {
    unsigned long dernierTempsChrono;
    if (millis() - dernierTempsChrono >= 1000)
    {
      MiseAJour();
      TimeToArray();
      dernierTempsChrono += 1000;
    }
  }
  FastLED.show(); // Display leds array
  if (Heure >= HeureMax) EtatChrono = false;
}

void StartChrono () {
  EtatChrono = true;
}

void StopChrono () {
  EtatChrono = false;
}

void ResetChrono () {
  EtatChrono = false;
  Heure = 0;
}

Ça compile chez moi, mais est-ce que ça marche ? Je te laisse voir...

Merci lesept....

j'essaye ce soir ou demain matin en réel et je ferais un retour...

Bonsoir

lesept J'ai essayé le code mais rien ne se passe…..

il n'y a même pas une led qui s'allume.

Le précédent fonctionnait correctement ?
Je l'ai fait à tout vitesse : peux-tu décommenter tous les Serial.print et Serial.println et me dire ce qu'il affiche sur la console ?

Ajoute

Serial.print(" Mise a jour : heure = ");
Serial.println(Heure);

à la fin de la fonction MiseAJour.

Au passage, cette ligne est inutile :

#include <DS3232RTC.h>

Les deux suivantes aussi je pense...

Tu as bien branché les boutons et les LEDs selon ces définitions ?

#define DATA_PIN 6  // Data pin for led comunication
#define BP_START 7 // Pin bouton Start
#define BP_STOP   8 // Pin bouton Stop
#define BP_RESET 9 // Pin bouton Reset
#define INTER 10   // Pin inter 15 / 45

Bonsoir

le programme pour l'horloge fonctionne parfaitement.

J'ai branche les leds au pin 6 de la carte en insérant une resistance de 470 ohms
le bouton start d'un coté au pin 7 de la carte et de l'autre au gnd(comme pour l'horloge)

Comment faire pour decommenter tout les serial print?

Tu enlèves les //

J'ai enlevé les // devant tout les serialprint

et ajouter le code comme cela

void MiseAJour()
{
  Heure += 1;
  if (Heure % 100 == 60) Heure = Heure + 40;
  Serial.print(" Mise a jour : heure = ");
  Serial.println(Heure);
}

mais après je fait quoi ?

Tu l'exécute et tu me dis ce qu'affiche la console

J'ai televersé sur la carte et a la fin j'ai avrdude done thank you

Pour afficher la console, il y a un bouton en haut à droite de la fenêtre, je ne sais plus à quoi il ressemble. Cherche sur internet si besoin, la je ne peux pas, je suis sur mon téléphone donc assez limité.
Ça ouvre donc une nouvelle fenêtre qui va afficher du texte, c'est ce texte qui m'intéresse...

En fin du setup, tu peux ajouter:

      TimeToArray();
     FastLED.show();

Bonsoir

j'ai essayé de mettre ce code pour vérifier la console et j'ai bien le mot "bonjour" qui s'affiche dans la console

void setup()
{
Serial.begin(9600);
Serial.print("Bonjour !");
}

void loop()
{
// Vide, rien à répéter.
}

avec le programme du chronometre rien ne s'affiche dans la console.

Voici se que la console affiche :

Digit 4 is : 0 0000111111111111111111111111
Digit 3 is : 0 0000111111111111111111111111
Digit 2 is : 0 000011111111111111Digit 4 is : 0 0000111111111111111111111111
Digit 3 is : 0 0000111111111111111111111111
Digit 2 is : 0 000011111111111111Digit 4 is : 0 0000111111111111111111111111
Digit 3 is : 0 0000111111111111111111111111

Ainsi de suite en boucle

Il n'affiche pas Mise a jour : heure = xxxx ?
Ces textes s'affichent bien toutes les secondes, pas en continu ?

Au passage, à la fin de la fonction StartChrono, il faut ajouter

dernierTempsChrono = millis();

Après cette modif, peux-tu poster le code tel qu'il est et ce qu'affiche la console ? Merci

si je rajoute le code

dernierTempsChrono = millis();

sa me met que se n'est pas declaré dans le scope

le code actuel est

#include <DS3232RTC.h>
#include <Time.h>
#include <Wire.h>
#include "FastLED.h"
#define NUM_LEDS 114 // Number of LED controls (remember I have 3 leds / controler
#define COLOR_ORDER BRG  // Define color order for your strip
#define DATA_PIN 6  // Data pin for led comunication
#define BP_START 7 // Pin bouton Start
#define BP_STOP   8 // Pin bouton Stop
#define BP_RESET 9 // Pin bouton Reset
#define INTER 10   // Pin inter 15 / 45

CRGB leds[NUM_LEDS]; // Define LEDs strip
byte digits[10][28] = {
  {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //0
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, //1
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //2
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //3
  {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}, //4
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //5
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //6
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //7
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //8
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //9 | 2D Array for numbers on 7 segment
};
bool Dot = true;  //Dot state
int ledColor = 0x0000FF; // Color used (in hex)
int Heure = 0;
bool EtatChrono = false;  // Chrono arrêté
int HeureMax = 4500;

void setup() {
  Serial.begin(9600);
  //  Wire.begin();
  LEDS.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); // Set LED strip type
  LEDS.setBrightness(255); // Set initial brightness
  pinMode(BP_START, INPUT_PULLUP); // bouton START
  pinMode(BP_STOP, INPUT_PULLUP); // bouton STOP
  pinMode(BP_RESET, INPUT_PULLUP); // bouton RESET
  pinMode(INTER, INPUT_PULLUP); // inter 15 / 45
  TimeToArray();
  FastLED.show();

}

// Check Light sensor and set brightness accordingly
void BrightnessCheck() {
  const byte sensorPin = 3; // light sensor pin
  const byte brightnessLow = 5; // Low brightness value
  const byte brightnessHigh = 255; // High brightness value
  int sensorValue = digitalRead(sensorPin); // Read sensor
  if (sensorValue == 0) {
    LEDS.setBrightness(brightnessHigh);
  }
  else {
    LEDS.setBrightness(brightnessLow);
  }
}

// Convert time to array needet for display
void TimeToArray() {
  int cursor = 0;
  int Secondes = Heure % 100;
  int Now = Heure;

  Dot = true;
  if (Secondes % 2 == 1) Dot = false;
  if (Dot) {
    leds[56] = ledColor;
    leds[57] = ledColor;
  }
  else {
    leds[56] = 0x000000;
    leds[57] = 0x000000;
  }

  for (int i = 1; i <= 4; i++) {
    int digit = Now % 10; // get last digit in time
    if (i == 1) {
            Serial.print("Digit 4 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 0;
      for (int k = 0; k <= 27; k++) {
                Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
            Serial.println();
    }
    else if (i == 2) {
            Serial.print("Digit 3 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 28;
      for (int k = 0; k <= 27; k++) {
                Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
            Serial.println();
    }
    else if (i == 3) {
            Serial.print("Digit 2 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 58;
      for (int k = 0; k <= 27; k++) {
                Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
            Serial.println();
    }
    else if (i == 4) {
            Serial.print("Digit 1 is : ");Serial.print(digit);Serial.print(" ");
      cursor = 86;
      for (int k = 0; k <= 27; k++) {
                Serial.print(digits[digit][k]);
        leds[cursor + k] = ledColor * digits[digit][k];
        cursor ++;
      }
            Serial.println();
    }
    Now /= 10;
  }
}

void MiseAJour()
{
  Heure += 1;
  if (Heure % 100 == 60) Heure = Heure + 40;
  Serial.print(" Mise a jour : heure = ");
  Serial.println(Heure);
}

void LectureBoutons()
{
  int EtatBPStart = digitalRead(BP_START);
  int EtatBPStop = digitalRead(BP_STOP);
  int EtatBPReset = digitalRead(BP_RESET);
  int EtatInter = digitalRead(INTER);
  if (EtatBPStart) StartChrono ();
  if (EtatBPStop) StopChrono ();
  if (EtatBPReset) ResetChrono ();
  HeureMax = 4500;
  if (EtatInter) HeureMax = 1500;
}

void loop()  // Main loop
{
  LectureBoutons();
  if (EtatChrono)
  {
    unsigned long dernierTempsChrono;
    if (millis() - dernierTempsChrono >= 1000)
    {
      MiseAJour();
      TimeToArray();
      dernierTempsChrono += 1000;
    }
  }
  FastLED.show(); // Display leds array
  if (Heure >= HeureMax) EtatChrono = false;
}

void StartChrono () {
  EtatChrono = true;
}

void StopChrono () {
  EtatChrono = false;
}

void ResetChrono () {
  EtatChrono = false;
  Heure = 0;
}

Merci
pour que ça compile, il faut déplacer le ligne

   unsigned long dernierTempsChrono;

dans l'entête, après int HeureMax par exemple

Au passage, commente les lignes
                Serial.print(digits[digit][k]);c'est à dire que tu mets // en début de ces lignes
ça évitera trop de texte qui ne sert pas

le code compile et dans la console sur une ligne sa ecrit:

Dig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDigitDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮tDig⸮T⸮tDigitDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮tDig⸮T⸮tDigitDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮tDig⸮T⸮tDigitDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮tDig⸮T⸮tDigitDig⸮T⸮tDig⸮T⸮tDigitDig⸮T⸮tDig⸮T⸮tDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDigitDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮tDig⸮T⸮tDigitDigitDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮tDig⸮T⸮⸮⸮⸮⸮⸮⸮⸮⸮

Ainsi de suite

Tu as bien sélectionné 9600 en bas de la console ?

J"ai fini par avancer : ça marche chez moi sauf pour les boutons que je n'ai pas connectés. Donc s'il y a encore un problème, ça vient des boutons. Notamment, je n'ai pas géré les rebonds. Si on veut être précis, il ne faut pas utiliser un delay (je vais me renseigner sur e point) et faire plutôt une gestion matérielle. Là je ne suis pas très au courant, il faudra demander sur le forum.

Voici le code :

#include "FastLED.h"
#define NUM_LEDS 114 // Number of LED controls (remember I have 3 leds / controler
#define COLOR_ORDER BRG  // Define color order for your strip
#define DATA_PIN 6  // Data pin for led comunication
#define BP_START 7 // Pin bouton Start
#define BP_STOP   8 // Pin bouton Stop
#define BP_RESET 9 // Pin bouton Reset
#define INTER 10   // Pin inter 15 / 45

CRGB leds[NUM_LEDS]; // Define LEDs strip
byte digits[10][28] = {
  {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //0
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, //1
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //2
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //3
  {1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}, //4
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //5
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}, //6
  {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, //7
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //8
  {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //9 | 2D Array for numbers on 7 segment
};
bool Dot = true;  //Dot state
int ledColor = 0x0000FF; // Color used (in hex)
int Heure = 0;
bool EtatChrono = false;  // Chrono arrêté
int HeureMax = 4500;
unsigned long dernierTempsChrono;

void setup() {
  Serial.begin(115200);
  LEDS.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); // Set LED strip type
  LEDS.setBrightness(255); // Set initial brightness
  pinMode(BP_START, INPUT_PULLUP); // bouton START
  pinMode(BP_STOP, INPUT_PULLUP); // bouton STOP
  pinMode(BP_RESET, INPUT_PULLUP); // bouton RESET
  pinMode(INTER, INPUT_PULLUP); // inter 15 / 45
  TimeToArray();
  FastLED.show();
  dernierTempsChrono = millis();
}

// Check Light sensor and set brightness accordingly
void BrightnessCheck() {
  const byte sensorPin = 3; // light sensor pin
  const byte brightnessLow = 5; // Low brightness value
  const byte brightnessHigh = 255; // High brightness value
  int sensorValue = digitalRead(sensorPin); // Read sensor
  if (sensorValue == 0) {
    LEDS.setBrightness(brightnessHigh);
  }
  else {
    LEDS.setBrightness(brightnessLow);
  }
}

// Convert time to array needet for display
void TimeToArray() {
  int cursor = 0;
  int Secondes = Heure % 100;
  int Now = Heure;

  Dot = true;
  if (Secondes % 2 == 1) Dot = false;
  if (Dot) {
    leds[56] = ledColor;
    leds[57] = ledColor;
  }
  else {
    leds[56] = 0x000000;
    leds[57] = 0x000000;
  }

  for (int i = 1; i < 5; i++) {
    int digit = Now % 10; // get last digit in time
    cursor = (i - 1) * 28;
    if (i > 2) cursor += 2;
    Serial.print (" "); Serial.print(digit);
    for (int k = 0; k < 28; k++) {
      leds[cursor + k] = ledColor * digits[digit][k];
    }
    Now /= 10;
  }
  Serial.println();
}

void MiseAJour()
{
  Heure += 1;
  if (Heure % 100 == 60) Heure = Heure + 40;
  Serial.print("Heure = "); Serial.print(Heure); Serial.print (" :");
}

void LectureBoutons()
{
  if (digitalRead(BP_START)) StartChrono ();
  if (digitalRead(BP_STOP))  StopChrono ();
  if (digitalRead(BP_RESET)) ResetChrono ();
  HeureMax = 4500;
  if (digitalRead(INTER)) HeureMax = 1500;
}

void loop()  // Main loop
{
  LectureBoutons();
  if (EtatChrono)
  {
    if (millis() - dernierTempsChrono >= 1000)
    {
      MiseAJour();
      TimeToArray();
      dernierTempsChrono += 1000;
      FastLED.show(); // Display leds array
    }
  }
  if (Heure >= HeureMax) EtatChrono = false;
}

void StartChrono () {
  EtatChrono = true;
  dernierTempsChrono = millis();
}

void StopChrono () {
  EtatChrono = false;
}

void ResetChrono () {
  EtatChrono = false;
  Heure = 0;
}

Il faut que tu règles la console à 115200 (tout en bas, liste déroulante). Le code attend que tu appuies sur le bouton Start pour lancer le chrono. Bouton stop pour l'arrêter et start pour le relancer. Reset remet à 0 et attend start pour lancer le chrono.
Enfin, l'interrupteur permet de choisir entre 15 et 45 minutes.

Dis-moi si ça marche ...
A+