   client.publish("home/back/window", "true");
     delay(1000);
 }
-void suscribir(){
-  //por ahora no hago nada aca.
+void suscribirse(){
+  client.subscribe("arduino");
   
 }

{
  Serial.begin(9600);
  Ethernet.begin(mac, ip);
}

void loop()

byte server[] = { 192, 168, 2, 1 };
byte ip[]     = { 192, 168, 2, 20 };

// Callback function header
void callback(char* topic, byte* payload, unsigned int length);

//aca manejo lo que me envian
void callback(char* topic, byte* payload, unsigned int length) {
  // Allocate the correct amount of memory for the payload copy
  byte* p = (byte*)malloc(length);
  // Copy the payload to the new buffer
  memcpy(p,payload,length);
  Serial.println("tu vieja");
  // Free the memory
  free(p);
}


EthernetClient ethClient;
PubSubClient client(server, 1883, callback, ethClient);
