WiFi shild client. Parse json file


hi everybody

i've arduino wifi shild. it's working client, parse data file data.json

there file data.json:
code: [select]
{
"statusbut": "0",
"statusbut2": "1"
}


how can provide data file in form this:

statusbut = 0;
statusbut2 = 1;

so  statusbut , statusbut2 variables.

there how data file:

code: [select]

void loop() {
  // if there's incoming data net connection.
  // send out serial port.  debugging
  // purposes only:
  while (client.available()) {
    char c = client.read();
    serial.write(c);
  }
  // if ten seconds have passed since last connection,
  // connect again , send data:
  if (millis() - lastconnectiontime > postinginterval) {
    httprequest();
  }
}



i attached full scratch below



Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > WiFi shild client. Parse json file


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code