When compiling i get an error:
exit status 1
'StaticJsonBuffer' was not declared in this scope
This is the location of the error
/********************************** START SEND STATE*****************************************/
void sendState() {
StaticJsonBuffer<BUFFER_SIZE> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["state"] = (stateOn) ? on_cmd : off_cmd;
JsonObject& color = root.createNestedObject("color");
color["r"] = red;
color["g"] = green;
color["b"] = blue;
root["brightness"] = brightness;
root["effect"] = effectString.c_str();
char buffer[root.measureLength() + 1];
root.printTo(buffer, sizeof(buffer));
client.publish(light_state_topic, buffer, true);
}
Is there a fix for this?