 #include <LoRa.h>
 #include <Wire.h>  
 #include "SSD1306.h"
+#include "esp_deep_sleep.h"
 
 #define echoPin 12 // Echo Pin
 #define trigPin 13 // Trigger Pin

  Serial.println(distance);
  sendPacket("W:" + String(distance));

  delay(10000);
}

void sendPacket(String contents) {
  display.clear();
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.setFont(ArialMT_Plain_10);
  
  display.drawString(0, 0, "Sending packet: ");
  display.drawString(90, 0, contents);
  display.display();

  // send packet
  LoRa.beginPacket();
  String packet = (contents);

  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  
  //digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  //delay(50); 
  //digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 in high
  
  Serial.begin(115200);
  while (!Serial);
  
  SPI.begin(SCK,MISO,MOSI,SS);
  LoRa.setPins(SS,RST,DI0);
