     Serial.println(F("OP_TXRXPEND, not sending"));
   } else {
     // Prepare upstream data transmission at the next possible time.
-    LMIC_setTxData2(1, mydata, sizeof(mydata) , 0);
+    LMIC_setTxData2(1, sensordata, sizeof(sensordata) , 0);
     Serial.println(F("Packet queued"));
   }
   // Next TX is scheduled after TX_COMPLETE event.

const int analogInPin = A1; //Analog input pin that potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)


//Bodenfeuchtigkeitssensor
int val = 0; //value for storing moisture value
int soilPin = A2; //Declare a variable for the soil moisture sensor
int soilPower = 7; //Variable for Soil moisture


// These callbacks are only used in over-the-air activation, so they are


 *******************************************************************************/

#include <lmic.h> //lmic master library (LoRa) 
#include <hal/hal.h>
//#include <SPI.h> falls Sensoren mit SPI betrieben werden sollen

#include <Adafruit_BME280.h> //bme library einbinden
#include <Adafruit_Sensor.h> //Zusatz zur bme library
#define SEALEVELPRESSURE_HPA (1013.25) //

Adafruit_BME280 bme; //I2C

