mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-25 08:17:32 +02:00
Updated example
This commit is contained in:
@ -23,17 +23,17 @@ void setup()
|
||||
return;
|
||||
}
|
||||
|
||||
char* sensor = root.getString("sensor");
|
||||
char* sensor = root["sensor"];
|
||||
Serial.println(sensor);
|
||||
|
||||
long time = root.getLong("time");
|
||||
long time = root["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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user