Problema con DHT22 e XIVELY

Salve a tutti,
ho provato ad uplodare i miei dati provenienti da un DHT22 verso XIVELY; tutto sembrava funzionare ma il problema è che mi va solo la prima volta l’updatate di temperatura ed umidità e poi niente piu’…posto il mio codice (preso dall’esempio suggerito da xively tutorial ed opportunamente modificato).
la connessione funziona in quanto i dati vengono spediti e riportati ma solo la prima volta, poi non vengono piu’ fatti aggiornamenti.
Grazie in anticipo

Francesco

PS:nello sketch è gestita solo la temperatuta (humidity commentata).

/*
##Xively WiFi Sensor Tutorial##
This sketch is designed to take sensors (from photocell) and upload the values to Xively
at consistant intervals. At the same time it gets a setable value from Xively to adjust the brigthness
of an LED. This sketch is reusable and can be adapted for use with many different sensors.
Derived from Xively Ardino Sensor Client by Sam Mulube.
 
By Calum Barnes 3-4-2013
BSD 3-Clause License - [http://opensource.org/licenses/BSD-3-Clause]
Copyright (c) 2013 Calum Barnes
*/
#include <SPI.h>
#include <Ethernet.h>
#include <HttpClient.h>
#include <Xively.h>
#include <DHT22.h>

#define DHT22_PIN 8 //definizione pin sensore DHT22
DHT22 istanzaDHT22(DHT22_PIN); // creazione oggettodi tipo DHT22 
 

byte mac[] = {  0x90, 0xA2, 0xDA, 0x00, 0x74, 0x99 };
IPAddress ip(192,168,0,7);
IPAddress gateway(192,168,0, 1);

 
// Your Xively key to let you upload data
char xivelyKey[] = "fhgdghdfjjgfhjfghjhfg";
//your xively feed ID
#define xivelyFeed 2985903475324
//datastreams
char TemperatureID[] = "Temperature";
char HumidityID[] = "Humidity";


 
// Define the strings for our datastream IDs
  XivelyDatastream datastreams[] = {
  XivelyDatastream(TemperatureID, strlen(TemperatureID), DATASTREAM_FLOAT),
  //XivelyDatastream(HumidityID, strlen(HumidityID), DATASTREAM_FLOAT),
};
// Finally, wrap the datastreams into a feed
XivelyFeed feed(xivelyFeed, datastreams, 1 /* number of datastreams */);
 
EthernetClient client;
XivelyClient xivelyclient(client);
 
void setup() {
  Serial.begin(9600);
  Serial.println("Starting single datastream upload to Xively...");
  Serial.println();
 
  Serial.println("Attempting to get an IP address using DHCP:");
  if (!Ethernet.begin(mac)) {
    Serial.println("failed to get an IP address using DHCP, trying manually");
        Ethernet.begin(mac, ip, gateway);
        delay(10000);
  }
  
  Serial.print("My address:");
  Serial.println(Ethernet.localIP());
  
}//fine setup


/*functions*/
  float temper(){
  delay(1500);
  istanzaDHT22.readData();
  float temp = istanzaDHT22.getTemperatureC();
  return temp;
}

float umid(){
   delay (1500);
   istanzaDHT22.readData();
   float umid = istanzaDHT22.getHumidity();
   return umid;
}  
 
void loop() {
  
  int getReturn = xivelyclient.get(feed, xivelyKey);    //get data from xively
  if(getReturn > 0){
    Serial.println("LED Datastream");
    Serial.println(feed[1]);
  }else Serial.println("HTTP Error");
  
feed[1].getFloat();
  

  //read sensor values
  
  
  float temp = temper();
  //float hum = umid();
  datastreams[0].setFloat(temp);
  //datastreams[1].setFloat(hum);
  
  //print the sensor value on monitor
  Serial.print("Read sensor temperature value ");
  Serial.println(datastreams[0].getFloat());
  //Serial.print("Read sensor humidity value ");
  //Serial.println(datastreams[1].getFloat());
 int ret =0;
  //send value to xively
  Serial.println("Uploading it to Xively");
  ret = xivelyclient.put(feed, xivelyKey);
  //return message
  Serial.print("xivelyclient.put returned ");
  Serial.println(ret);
  Serial.println("");
  //delay between calls
  delay(15000);
}