Skip to content

Instantly share code, notes, and snippets.

@ArduinoDiscordBot
Created January 15, 2021 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArduinoDiscordBot/a1933f1edba3f13c6000b9b27bfa626d to your computer and use it in GitHub Desktop.
Save ArduinoDiscordBot/a1933f1edba3f13c6000b9b27bfa626d to your computer and use it in GitHub Desktop.
Code by timotejj#8782 - Fri Jan 15 2021 22:11:11 GMT+0000 (Coordinated Universal Time)

This gist was pasted by the Arduino discord server bot.

This gist was automatically pasted at the request of the code author or one of the discord server helpers. If you have any suggestions or bugs to report, you can do so on our GitHub repository, or in our discord server. This project is run by volunteers so feel free to fork and commit your changes then open a pull request!


⬇️ Pasted Code ⬇️

// Parse JSON object
JsonObject& root = jsonBuffer.parseObject(payload);
if (!root.success()) {
Serial.println(F("Parsing failed!"));
return;
}
// Decode JSON/Extract values
Serial.println(F("Response:"));
Serial.println(root["Miestnost"].as<char*>());
Serial.println(root["Status"].as<char*>());
}
else
{
Serial.println("Error in response");
}
http.end(); //Close connection
delay(5000); //GET Data at every 5 seconds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment