15 lines
460 B
C++
15 lines
460 B
C++
|
// Copyright Siwat INC(tm) 2019
|
||
|
// Created by Siwat Sirichai
|
||
|
// ESPCommander EXTENDED v1.2
|
||
|
void espcommander(String topic, String command) { //the command is in json format!
|
||
|
StaticJsonDocument<200> doc;
|
||
|
DeserializationError error = deserializeJson(doc, json);
|
||
|
if (error) {
|
||
|
Serial.print(F("deserializeJson() failed: "));
|
||
|
Serial.println(error.c_str());
|
||
|
return;
|
||
|
}
|
||
|
String command = doc["command"];
|
||
|
String value = doc["value"];
|
||
|
}
|