/*
Custom inverter chip example for Wokwi.
Start the simulation. The green LED shows the output of the inverter.
For more information: https://docs.wokwi.com/chips-api/getting-started
*/
void setup() {
pinMode(13, INPUT);
Serial.begin(500000);
}
int last = 0;
long time = 0;
void loop() {
int reading = digitalRead(13);
if(last != reading) {
last=reading;
Serial.println(micros() - time);
time = micros();
}
}