     join_result = myLora.init();
   }
   Serial.println("Successfully joined TTN");
-  
-  led_off();
-
-  // Initialize I2C communication
-  Wire.begin();
-  // Set the starting value for the pressure difference to 0
-  difPressure = 0.0;
-  delay(2000);
-  
 }
-
-// Just for testing sending a float
-static uint8_t floatdata[] = { 0,0,0,0,0,0,0,0};
-
-// the loop routine runs over and over again forever
-void loop() {
-  led_on();
-  readPressure();
-  Serial.print("TXing: ");
-  Serial.println(difPressure);
-  dtostrf(difPressure,5,2,(char*)floatdata);
-  myLora.txUncnf(floatdata); // non blocking call
-  //myLora.txCnf(difPressure);    // blocking call
-  
-  led_off();
-
-  delay(20000);
-}
-
 
 void readPressure() {
   difPressure = SDP6x.GetPressureDiff();

{
  digitalWrite(13, 0);
}

SoftwareSerial mySerial(7, 8); // RX, TX
#define RST  2

// Tresholds for filtering out noise and non bikes
#define UPPER_TRESHOLD 200.0
#define LOWER_TRESHOLD -200.0

// How long to ignore new spikes in bike detection after a successful count
#define COUNTING_PAUSE_TIME 3000

// Recording cycle running variables, will be reset whenever a message is full or time is up
// Count of bikes in the current rexording cycle
unsigned int bikeCount = 0;
// Start time of the current recording cycle
unsigned long cycleStartTime = 0;
unsigned long cycleEndTime = 0;
// duty time of a cycle
long cycleDuration = 60000; // 1 minute (only for PoC, should be 10 minutes later)

// README FIRST:
// Rename or copy the File TTNCredentials.h.editme and remove the .editme ending.
// Edit it it accordingly and put your TTN keys in there, make sure you add it to git ignores.
// Here we load it to be used, this file is kept out of GIT as its the private parts
#include "TTNCredentials.h"

// Debugging options
#define debug FALSE

rn2xx3 myLora(mySerial);

