String construirParametro() {
  String p = "";
  int valor;
  for (i = 0; i < nleds; i++) {
    if (leds[i] < 10) {
      p += "ds0" + String(leds[i]) + String(digitalRead(leds[i]));
    } else {
      p += "ds" + String(leds[i]) + String(digitalRead(leds[i]));
    }
  }

  p += "|";
  for (i=0; i <nanal; i++){
    valor = analogRead(anal[i]);
    valor = map(valor,0,4095,0,100);
    p += "a" + String(i) + "=" + String(valor);
  }

  /*
  int valor = analogRead(5);
  valor = map(valor,0,1023,0,100);
  p += "a" + String(0) + "=" + String(valor);  
valor = analogRead(5);
  valor = map(valor,0,1023,0,100);
  p += "a" + String(0) + "=" + String(valor); 
  
  int valor = analogRead(36);
  valor = map(valor,0,1023,0,100);
  p += "a" + String(5) + "=" + String(valor);
  */
  p += "|";
  p += "z";
  return p;
}

