void setup() {
  // put your setup code here, to run once:
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
Serial.begin(9600);
Serial.println("checking..");
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(2,0);
delayMicroseconds(18);
digitalWrite(2,1);
delayMicroseconds(20);
pinMode(2, INPUT);
while(!digitalRead(2)){
Serial.println("Data received ");
}

}