ArduinoJson | 📟 JSON library for Arduino and embedded C++ Simple and efficient
kandi X-RAY | ArduinoJson Summary
kandi X-RAY | ArduinoJson Summary
ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ArduinoJson
ArduinoJson Key Features
ArduinoJson Examples and Code Snippets
Community Discussions
Trending Discussions on ArduinoJson
QUESTION
I've been using the Thinger.io platform for some of my IoT projects (mostly ESP8266 modules) for quite a long time now. The way I implemented it is something similar to that:
...ANSWER
Answered 2022-Mar-27 at 14:01It would be better if you ask this question on the thinger community, the thinger.io https://community.thinger.io/ where the thinger devs or community will be listening.
I have some working code, see below, this works with SIM7000E, but it should work OK with SIM800 the code should work the same. I have noticed that you are not using the thinger library (ThingerTinyGSM.h) and this is probably why the device isn't connecting to thinger.
QUESTION
I'm having trouble getting the keys (and values) from "prefs" in the following json.
...ANSWER
Answered 2022-Feb-07 at 19:12Since prefs
is an array, convert it to JsonArray
QUESTION
I'm having an issue with the httpsecureclient library for the ESP in the Arduino IDE.
I try to send http requests to a https domain (that doesn't change) and works alot of times just fine.
Like I do some HTTP calls to obtain certain data to let the ESP do it's thing. But when I want to let the ESP post a payload to a server, using the WiFiClientSecure
and HTTPClient
, it sometimes works without issues, but all of a sudden, it stops working and throws me the well known, nothing saying -1
response code...
The code I ues to send a heartbeat is the following;
...ANSWER
Answered 2021-Dec-27 at 21:39I currently run into same troubles after updating the libraries, old code for esp32 http clients stopped to work with the same symptoms.
I could solve this by switching to simply use HTTPClient only, without WiFiClientSecure. And it works with https.
QUESTION
How can I make the WifiManager library work on a ESP32 board? I'm using PlatformIO to develop my code.
Here are my imports:
...ANSWER
Answered 2021-Nov-16 at 18:22The latest release of WiFiManager library (0.16) is almost a year old and doesn't support ESP32.
You will need to install the library from Github to get ESP32 support.
In your platformio.ini replace
QUESTION
I am trying to authenticate using signIn()
method and exact replica of example code from ESP32 Client library (the new version)
- When I run my code I successfully connect to
WiFi
and also I can successfullyCREATE
new account from the ESP32 board. - I need to know if my log in or registration was successful
- In my
Firebase authentication
signup withemail/pass
is enabled.
In my serial monitor I can read that the error code is 400
this:
Code that I am using:
...ANSWER
Answered 2021-Oct-15 at 10:16- The problem was that I was checking for the
Firebase.authenticated()
method too early, and the Firebase did not have time to authenticate. - If I check it in the main
loop()
it works.
GitHub discussion where we find the solution.
QUESTION
I cannot not find a solution for this problem. Everything worked very well when I tried a month ago, but now, when I launch it, it does not work anymore. The problem occurs when I send http.POST(data);
request to the given address, but Serial.println(httpResponseCode);
returns -11
. I've tested my domain URL
on Postman and everything worked there. Thank you for any help.
ANSWER
Answered 2021-Sep-27 at 11:51http.begin(client, authentication);
QUESTION
I am working on an Arduino project that will mix cocktails for me. I've decided to save a list of cocktails in a JSON file named cocktails.json, which is saved on an SD card, and upon cocktail selection, I would like the Arduino to find its recipe in the JSON file. A small snippet of the JSON looks like this:
...ANSWER
Answered 2021-Aug-27 at 12:41As I mentioned in comment, if you are saving data in SD (and writing C++), there is no need to add extra layer of encoding/decoding of JSON, you can read and write data with C++ struct.
Before showing how to to do read/write of struct into file, the struct you shown won't hold the data you want to represent, each cocktail recipe consists of name (a string), and an array of ingredients, each ingredient consists a string, and byte that represent the type of liquor and portion. So we are dealing with a struct within a struct.
QUESTION
I am getting started with electronics and microcontrollers programming.
I have made a simple circuit where I use DHT22 sensor to measure temperature and humidity. I have also made my own API in Node and Express (MongoDB as a database). It is very simple API, just two endpoints: one for getting. and one for posting data. I ma able to create succesfull requests using Postman (and with the browser).
Just to be clear, I want to send temperature and humidity to my API, and then do some work with this data on Vue website (I think that this is not relevant at all, but again, just to be clear what I am trying to achieve).
Now I will say what I am using:
Windows 10 OS NodeMCU ESP32 microcontroller DHT22 sensor HTTPClient library (I think this one is causing a problem) PlatformIO with Arduino.h header file Everything is ok, but when I try to send data to my database things fail. I am ALWAYS getting following error
[e][wifigeneric.cpp:739] hostbyname(): dns failed
I have tried to make the POST request using both http://localhost:3000/endpoint and http://127.0.0.1/endpoint (that part is really strange, why I am getting DNS error when using IP address without domain name?).
I have already looked up for the solution on the web. I have come across many similar questions on github, but any of them worked for me). Also, none of them were solving error caused by line 739.
Here I will leave my code. Is is simple and short, so I will post all of it. Please, do not blame me for my c++ skills, I am getting better :D
Thank you in advance, have a nice day or evening.
Kind regards, Bartek.
...ANSWER
Answered 2021-Jul-24 at 20:10You're calling the begin()
method on http
with two arguments, which are meant to be a hostname and a port number (and optionally a URI/path). Instead of passing a hostname, you're passing a full URL, which the HTTP client is attempting to resolve as a hostname.
The single argument form of http.begin()
does take a URL. The form you're calling does not.
You can confirm this by reading the source code, which allows for these declarations of the begin()
method:
QUESTION
I'm trying to do a GET request to my weather forecast API service with an Arduino nano 33 IoT but I can't parse JSON data because the code output also other information inside the string, is there a way to "clean" the string with only the JSON data? Here's my code
...ANSWER
Answered 2021-Jul-14 at 18:08A simple solution is to modify the string.
Looking at the Arduino documentation for String, it seems you have several functions available to you that can help solve this.
For example, you could use indexOf
, lastIndexOf
and substring
to get everything between the first '{' and last '}':
QUESTION
I am trying to run a program using the ArduinoJson library with the VSC extension Code Runner but I cannot compile it.
There are no markup errors or warnings in VSC but when I try to run this snippet:
...ANSWER
Answered 2021-Jul-09 at 03:42I think you should change last includePath
to "C:/.../project/External_Libraries/ArduinoJson/src". That is because actual include already has it as relative path #include
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ArduinoJson
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page