 #define MOTOR_SWITCH_RIGHT 1
 int motorSwitchDetected = 0;
 
+// Timer Trigger Switches
+
+#define PORT_TIMER_SWITCH 15 // D8 = GPIO15
 
 int counter = 0;
 float h; // humidity

enum SystemState {
  IDLE,
  PUBLISHING_ENVIRONMENT_EVENT,
  TILTING_TRAY_LEFT,
  TILTING_TRAY_RIGHT,
  OTA_IN_PROGRESS,
  MOTOR_SWITCH_DETECTED
};

SystemState state = IDLE;

  //publishDebug("Initialising Motor");
  initMotor();
  initSwitches();
  //publishDebug("Initialising Timers");
  //initTimers();
  initTimers();
//----------------- wifi_set_sleep_type(LIGHT_SLEEP_T);
//----------------- gpio_pin_wakeup_enable(GPIO_ID_PIN(2),GPIO_PIN_INTR_HILEVEL);
