I'm doing my final project and i have a trouble! When I send a datapoint from Arduino to xively and then i read the datastream the value is correct, but when i write the datapoint directly in Xively and then i do datastream[0].getFloat(), the value always is 0. I tried with an old version of Arduino IDE, changing the variables but nothing. I need help!!
My sketch is:

#include <SPI.h>
#include <WiFly.h>
#include <HttpClient.h>
#include <Xively.h>
#include <Sensirion.h>

char ssid[] = "......."; // Network SSID
char passphrase[] = "......."; // Contraseña red WiFi

// XivelyKey para que me lo cargue en mi feed
char xivelyKey[] = "...................................................";

// Define the string for our datastream ID
char temperatureId[] = "Ordenes";

XivelyDatastream datastreams[] = {
XivelyDatastream(temperatureId, strlen(temperatureId), DATASTREAM_FLOAT),
// Finally, wrap the datastreams into a feed
XivelyFeed feed(................, datastreams, 1 /* number of datastreams */);

WiFlyClient client;
XivelyClient xivelyclient(client);

void setup() {
//Inicialización del puerto serie y conexión a WiFi

Serial.println("Starting multiple datastream upload to Xively...");

// Bucle de conexión a la red WiFi



Serial.println("finished beginning");

while(!WiFly.join(ssid, passphrase)){
WiFly.join(ssid, passphrase);
Serial.println("Association failed.");
Serial.println("Connected to wifi");

void loop() {
// int ret = xivelyclient.get(feed, xivelyKey);
// Serial.print("xivelyclient.get returned ");
// Serial.println(ret);
// if (ret > 0)
// {
Serial.println("Datastream is...");

Serial.print("Temperature is: ");
float float_value = datastreams[0].getFloat();
Serial.println(float_value, DEC);

// }



And the message in Monitor Serial is :

Datastream is...
{ "id" : "Ordenes", "current_value" : "0.00" }
Temperature is: 0.00
{ "id" : "Ordenes", "current_value" : "0.00" }

In Xively the current value is: 45

You have so much stuff commented out of the program, it doesn’t look like it does anything. You’re missing a put, and you’re reading out the wrong thing. Also, I would throw away the WiFly stuff until I got the xively stuff working correctly. One thing at a time.

I would also look at the code example here, in Chapter 12 - see attached. Note, this example has 3 data variables in the feed.,navId-322496,descCd-DOWNLOAD.html

// send the supplied value to Xively, printing some debug information as we go
void sendData(int streamIndexNumber, float sensorValue) {

  Serial.print("Sensor value is: ");

  Serial.println("Uploading to Xively");
  int ret = xivelyclient.put(feed, API_KEY);
  //Serial.print("PUT return code: ");

// get the value of the datastream from Xively, printing out the values we received
void getData(int stream) {
  Serial.println("Reading the data back from Xively");

  int request = xivelyclient.get(feed, API_KEY);
  //Serial.print("GET return code: ");

  if (request > 0) {
    Serial.print("Datastream: ");

    Serial.print("Sensor value: ");

EDIT: you’ll also get more attention if you post this sort of thing to the Networking section.

APFD_Chapter12_Home_Sensing_Station.ino (4.65 KB)

There's a special case with WiFly ,Please see the problem I'm facing >> WiFly Xively Library errors - SparkFun Electronics