   Serial.println(valueJson);
   //post observation to: http://opensensemap.org:8000/boxes/boxId/sensorId
   // if you get a connection, report back via serial: 
+  wdt_reset();
   if (client.connect(server, 8000)) 
   {
     Serial.print("connected..."); 

    Serial.print("."); 
  }
  Serial.println();
  
  //initialize barometer and DHT sensors
  barometer.init();
  dht.begin();
}

void loop()
{
  // if there's incoming data from the net connection.
  // send it out the serial port.  This is for debugging purposes only
  if (client.available()) {

/*
SenseBox Citizen Sensingplatform
Version: 1.2
Date: 2015-01-06
Homepage: http://sensebox.uni-muenster.de/bestellen/fuer-buerger/
Author: Jan Wirwahn
Note: Version with additional sensors for GIS-GK@ifgi
*/
#include <Wire.h>
#include <SPI.h>
#include <EthernetV2_0.h>
#include <DHT.h>
#include <Barometer.h>
#include <Digital_Light_TSL2561.h>
#include <avr/wdt.h>

//SenseBox ID

//Sensor IDs

//Sensor pin settings
#define NOISEPIN A0
#define DHTPIN A1
#define UVPIN A2
#define DHTTYPE DHT11
//Ethernet shield settings
#define W5200_CS  10
#define SDCARD_CS 4

//Network settings
IPAddress ip(192,168,178,111);//If DHCP is disabled, specify an IP according to your network settings
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
char server[] = "opensensemap.org";
EthernetClient client;

String currentSensorId = TEMPERATURESENSOR_ID;
float temperature;
float humidity;
float pressure;
unsigned long  lux;
int analogNoise;
int uvValue;

DHT dht(DHTPIN, DHTTYPE);
Barometer barometer;

//Variables for time sync and upload intervall
const unsigned long postingInterval = 10*1000*60; //1 minute
unsigned long lastConnectionTime = 0;
boolean lastConnected = false;
boolean uploadSuccess = true;
String sensorSample;
int sampleType = 1; //1=temp,2=humi,3=baro,4=light

void setup(){
  Wire.begin();
  Serial.begin(9600);
  //Setup chip select and deselect the SD card
  pinMode(SDCARD_CS,OUTPUT);
  digitalWrite(SDCARD_CS,HIGH);
  delay(500);
  // start the Ethernet connection 
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP.");
    //If DHCP is disabled, use static IP
    Ethernet.begin(mac, ip);
  }else Serial.println("DHCP setup successful.");
  //Print the IP to serial port
  Serial.print("My IP address: ");
  for (byte thisByte = 0; thisByte < 4; thisByte++) {
