Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By primateio
#41002 Ok, I decided that anything worth doing is worth doing right, so I went ahead and took your advice martinayotte and went with JSON. It works amazingly. Now I can send all sorts of data. Here is the code.

Code: Select all      StaticJsonBuffer<200> jsonBuffer;
      JsonObject& root = jsonBuffer.parseObject((char *)payload);

      Serial.print("X = ");
      Serial.println((int)root["x"]);

      Serial.print("Y = ");
      Serial.println((int)root["y"]);


Thank you for your recommendation.
User avatar
By martinayotte
#41009 Great ! @primateio !
Although this solution is consuming more CPU cycle, it is the way to go for expandability !
It allow other folks to get thru same solution especially when they have much complex thing to transmit than simple X/Y coordinate ... ;)
User avatar
By Espradio01
#78292 Hi all

I know this is an old post but could someone please help me splitting this data into variables :
Code: Select all#,test,place,1537272000,1537272000,Normal,1234,12

The data is received in the PAYLOAD .
I really just need to understand how to deal with it as most of the examples just show INT , like the question here.

Thank you in advance

D