bool WRison; bool CHison; void handleCmd() { String out; char temp[25]; if (server.args() == 1) { if (server.argName(0) == "WRon") { WRison = true; CHison = false; } else if (server.argName(0) == "WRoff") WRison = false; else if (server.argName(0) == "CHon") { CHison = true; WRison = false; } else if (server.argName(0) == "CHoff") CHison = false; } out += "

24V LeadAcid Monitor

"; out += "

"; sprintf(temp," Volt %.2f  ",volt); out += temp; sprintf(temp," Amps %.2f",current); out += temp; out += "

"; out += "
\n"; out += " \n"; if (CHison) out += "Charger is ON  "; else out += "Charger is OFF "; out += "

\n"; out += " \n"; if (WRison) out += "WR is ON  "; else out += "WR is OFF "; out += "

\n"; out += "
"; server.send(200, "text/html", out); } void handleNotFound() { server.send(404, "text/plain", "Not Here"); }