unsigned int horloge[1024] = {0}; void setup() { Serial.begin(115200); } unsigned long temps; unsigned long echantillon; void loop() { // affichage des 1024 restes if ((echantillon++ & 0xFFFFFL) == 0) // Tous les 1.000.000 restes { for (unsigned int ligne = 0; ligne < 1024; ligne+=32) // 32 lignes { if (ligne < 10) Serial.print(" "); // Pour avoir des valeurs alignées if (ligne < 100) Serial.print(" "); if (ligne < 1000) Serial.print(" "); Serial.print(ligne); Serial.print(":"); // N° du premier reste for (byte j = 0; j < 32; j++) // 32 colones: affichage du nombre de restes trouvés { Serial.print(" "); unsigned long valeur = horloge[ligne + j]; if (valeur < 10) Serial.print(" "); // Pour avoir des valeurs alignées if (valeur < 100) Serial.print(" "); if (valeur < 1000) Serial.print(" "); if (valeur < 10000) Serial.print(" "); if (valeur < 100000) Serial.print(" "); Serial.print(valeur); } Serial.println(); } Serial.println("\n\n"); } temps = millis(); horloge[temps % 1024]++; }