 
   return 1;
 }
-
 void loop() {
+#ifdef DEBUG
+  static int last_debug = 0;
+  if (millis()-last_debug > 1500) {
+    Log.print("State: ");
+    Log.println(machinestateName[machinestate]);
+  }
+#endif
+  
   handleMachineState();
   tock();
 


#if FAKEREADERTEST
  MFRC522::Uid uid = { 0, 0, 0 };
  static unsigned long test = 0;
  if (millis() - test > 15000) {
    uid = { 4, { 1, 2, 3, 4}, 0 };

#error "You will need to increase te MQTT_MAX_PACKET_SIZE size a bit in PubSubClient.h"
#endif

#include "../../../.passwd.h"

const char* ssid = WIFI_NETWORK;
const char* wifi_password = WIFI_PASSWD;
