Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Hneve
#39839 Hi,
I've experimented with a web server response thingamajig and this code works :
Code: Select allvoid handleDigitalWrite(){
  String message = "OK\n\n";
  String portString = server.argName(0);
  message += portString;
  message += "pin is set to:";
  int portnr = portString.toInt();
  String stateString = server.arg (0);
  message += stateString;
  int statenr = stateString.toInt();
  digitalWrite(portnr,statenr);
  server.send (200, "text/plain", message );
}


I wonder if there is a other way to do this.