int t1 = 19;
int e1 = 16;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(t1, OUTPUT);
pinMode(e1, INPUT);
Serial.println("Hello, Idly!");
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(t1, HIGH);
delay(500);
digitalWrite(t1, LOW);
int input = pulseIn(e1,HIGH);
int output = input*0.034/2;
Serial.println(output);
delay(10); // this speeds up the simulation
}