Closed choncba closed 8 years ago
Hello Luciano,
It seems that you are trying to convert a JsonVariant
to char
, which is not supported.
You probably have code like this:
char c = myObject["key"];
you just need to change it to:
byte c = myObject["key"];
Thank you @bblanchon ! I was focused on thinking it was a problem of memory allocation and did not see the obvious. Here is my code:
StaticJsonBuffer
if (recibido.success())
{
int NumSalida = recibido[0];
Estados.EstadoSalida[NumSalida] = recibido[1];
// SendCmd() takes 3 chars as argument
//SendCmd('S', recibido[1], recibido[0]); // -> This way produces the error
SendCmd('S', Estados.EstadoSalida[NumSalida], NumSalida); // This way is ok
}
So, the EasyTransfer library has nothing to see with this error.
You're welcome Luciano, thanks for using ArduinoJson.
Don't hesitate to edit the wiki if you think you can improve it. In particular, feel free to add your projects to Projects using ArduinoJson.
Also, a GitHub star is always appreciated :wink:
Hello everyone, first of all I want to congratulate the creator of this excellent library. I use a ESP8266 ESP12 , in one of my projects I use EasyTransfer library (https://github.com/madsci1016/Arduino-EasyTransfer) to synchronize with another arduino via serial link. When trying to compile ArduinoJSON with this compiler fails with the following message:
This library uses malloc () to allocate memory.
Any ideas?
Thanks.-