   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..."); 

/*
SenseBox Citizen Sensingplatform
Version: 1.0
Date: 2014-05-11
Homepage: http://sensebox.uni-muenster.de/bestellen/fuer-buerger/
Author: Jan Wirwahn
*/

//libraries to include
#include <DHT.h>
#include <Barometer.h>
#include <Wire.h>
#include <SPI.h>
#include <EthernetV2_0.h>
 
//Ethernet shield settings
#define W5200_CS  10
#define SDCARD_CS 4

//Define analog ports used by sensors
#define NOISEPIN A0
#define LIGHTPIN A1
#define DHTPIN A2   

/* 
* USER SETUP 
* Provide your SenseBoxID and , if your network does not support DHCP, an IP address!
*/
//SenseBox ID

//If DHCP is not enabled, specify an IP according to your network settings:
IPAddress ip(192,168,178,111);

//Senor IDs

//Network settings
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
char server[] = "opensensemap.org";
EthernetClient client;

//Measurement variables
float temperature, pressure, humidity;
int analogLightValue, analogNoiseValue;
float lightResistance; //Resistance of light sensor in K
String sensorSample;
int sampleType = 1;
String currentSensorId;

//Sensor instances
Barometer barometer;
DHT dht(DHTPIN, DHT11);

//Variables for time sync and upload intervall
const unsigned long postingInterval = 60 * 1000; //post meausrements each 60 seconds
unsigned long lastConnectionTime = 0;
unsigned long currentTime = 0;
boolean lastConnected = false;
boolean uploadSuccess = false;

void setup(){
  //Start serial port
  Serial.begin(9600);
  
  //Setup chip select and deselect the SD card
  pinMode(SDCARD_CS,OUTPUT);
  digitalWrite(SDCARD_CS,HIGH);
  
  // give the ethernet module time to boot up
  delay(1000);
  
  // 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++) {

    client.println(); 
    client.print(valueJson); 
    client.println(); 
    Serial.println("done!");
    uploadSuccess = true;
    //Change case
    if (sampleType == 5) {
      sampleType = 1;
