 		digitalWrite(leds[0], HIGH);
 		//set current state to active
 		currentRoomState = ACTIVE;
-		returnCode = publishToBroker("state", "active");
-	}
-	//if message publish not successful, error has occured
-	//report an error until board restarted and problem fixed
-	while (returnCode != 0) {
-		//turn off state LEDs
-		for (int i = 0; i < numLeds - 1; i++) {
-			digitalWrite(leds[i], LOW);
-		}
-		//flash send LED twice a second
-		digitalWrite(leds[3], HIGH);
-		delay(250);
-		digitalWrite(leds[3], LOW);
-		delay(250);
-	}
-	//turn off send LED
-	digitalWrite(leds[3], LOW);
+		publishToBroker("state", "active");
+	}
 }
 
 /**

		}
		//set current state to inactive
		currentRoomState = INACTIVE;
		returnCode = publishToBroker("state", "inactive");
	}
	//else if emergency button pressed
	else if (newRoomState == EMERGENCY) {

Copyright (c) Nicholas Tyrrell, Bournemouth University
Code inspired by http://www.eclipse.org/paho/clients/c/embedded/
*/

#define MQTTCLIENT_QOS2 1

#include <SPI.h>
#include <Ethernet2.h>
