 int visible;
 int solarVoltage;
 int batteryVoltage;
+bool daytime;
+
+typedef enum {
+  STATE_PROGRAM = 0,
+  STATE_BOOT,
+  STATE_WIFI_CONNECTING,
+  STATE_WIFI_COMPLETE
+} machine_state;
+
+machine_state currentState;
 
 extern char APIKEY[];
 // uncomment and put your thingspeak api here

  batteryVoltage = analogRead(A0);

  // early exit - battery voltage is too LOW
  if (batteryVoltage < 2180)
  {
    // if at night time wait 20 minutes before trying again
    if (solarVoltage < 2250)

    }
  }

  daytime = true;
  if (solarVoltage < 1000)
    daytime = false;

  delay(100);
  uvIndex.begin();
  tempSensor.begin();
}
