Professional Documents
Culture Documents
Json Udp Beacon
Json Udp Beacon
//
// You can easily test this program with netcat:
// $ nc -ulp 8888
//
// by Benoit Blanchon, MIT License 2015-2016
#include <SPI.h>
#include <Ethernet.h>
#include <ArduinoJson.h>
return root;
}
void setup() {
Ethernet.begin(mac, localIp);
udp.begin(localPort);
}
void loop() {
delay(1000);
StaticJsonBuffer<300> jsonBuffer;
JsonObject& json = buildJson(jsonBuffer);
sendJson(json);
}