Updated example

This commit is contained in:
Benoit Blanchon
2014-07-16 21:10:18 +02:00
parent 6164328892
commit 73eda08dd4

View File

@ -23,17 +23,17 @@ void setup()
return; return;
} }
char* sensor = root.getString("sensor"); char* sensor = root["sensor"];
Serial.println(sensor); Serial.println(sensor);
long time = root.getLong("time"); long time = root["time"];
Serial.println(time); Serial.println(time);
JsonArray coords = root.getArray("data"); JsonArray coords = root["data"];
for (int i = 0; i < coords.getLength(); i++) for (int i = 0; i < coords.size(); i++)
{ {
double value = coords.getDouble(i); double value = coords[i];
Serial.println(value, 6); Serial.println(value, 6);
} }
} }