const byte interruptPin = 2; const byte lt = 200; volatile byte state = 0; volatile byte trame[lt]; volatile unsigned long ttime[lt]; volatile byte i = 0; volatile unsigned long startt; const unsigned long tlimite = 150000; volatile unsigned long t; void setup() { pinMode(interruptPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(interruptPin), front, CHANGE); Serial.begin(115200); reset(); } void loop() { } void front() { t = micros(); if (i == 0) { startt = t; } if (t-startt > tlimite) { afficher(); } else { trame[i] = state; ttime[i] = t-startt; i++; state = 1-state; trame[i] = state; ttime[i] = ttime[i-1]; i++; if (i >= lt) { afficher(); } } } void afficher() { for (int j = 0; j