unsigned long time; void setup (){ Serial.begin(9600); pinMode(7,INPUT); } void loop (){ time=pulseIn(7,LOW); if(time > 0){ Serial.println(time); } }