aJSON: How to change item value ?
dear all.
i need send out data arduino in json format.
i try learn ajson.
here current test code.
my question : how change value of "mynumber_a" , "mynumber_b" inside loop ?
do have delete , re-add object ?
sincerely
-bino-
i need send out data arduino in json format.
i try learn ajson.
here current test code.
code: [select]
#include <ajson.h>
void setup()
{
serial.begin(9600);
delay(1000);
serial.println("ajson test");
ajsonobject *root;
root=ajson.createobject();
ajson.addnumbertoobject(root,"mynumber_a",1920);
ajson.addnumbertoobject(root,"mynumber_b",2570);
char *json_string=ajson.print(root);
delay(2000);
serial.println(json_string);
}
void loop()
{}my question : how change value of "mynumber_a" , "mynumber_b" inside loop ?
do have delete , re-add object ?
sincerely
-bino-
quote
how change value of "mynumber_a" , "mynumber_b" inside loop ?
perhaps if looked @ documentation addnumbertoobject() method, you'd have clue.
those strings can want them be.
Arduino Forum > Using Arduino > Programming Questions > aJSON: How to change item value ?
arduino
Comments
Post a Comment