     Serial.println(F("Can't connect to the server."));
     Serial.flush();
     conn.stop();
-    delay(DELAY);
     connectionAttempts++;
   }
 


  setupEthernet();
  connectToServer();
  delay(DELAY);
}

void loop() {

  }

  readData();

  if(pseudopod.shouldBroadcastPins() ) {
    delay(pseudopod.getBroadcastInterval());
    Serial.println(F("Sending pins"));
    pseudopod.sendConfiguredPins();
  }
}

void readData() {

  while (conn.available()) {
    Serial.println(F("Received message"));
    Serial.flush();

    if(pseudopod.readMessage() == TentacleMessageTopic_action) {
      pseudopod.sendPins();
    }
  }

}

void connectToServer() {
