   digitalWrite(trigPin, LOW);
   long duration = pulseIn(echoPin, HIGH);
   //Calculate the distance (in cm) based on the speed of sound.
-  int distance = duration/58.2  + 1;
+  int distance = duration/58.2 + 1;
   return distance;
 }
 

String packet ;

void setup() {
  pinMode(16,OUTPUT);
  pinMode(2,OUTPUT);
  
  digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  delay(50); 


void loop() {
  int distance = checkDistance();
  Serial.println(distance);
  sendPacket("W:" + String(distance));

  delay(10000);
}
