   }
 }
 
+//read input via serial
 void GetInput(){
   if (Serial.available() > 0) {
     incomingByte = Serial.read();

    //turn lights off
    if(incomingByte == 1){
       digitalWrite(RELAY1,0);
    }
    //turn lights on
    if(incomingByte == 2){
       digitalWrite(RELAY1,1);
    }
  }
}

void SendCommands(){
//  sensor operation
//  lighting
  if(aquaLightOn && aquaLightReading < minLightAqua){
    digitalWrite(aquaLed, HIGH);
  }
  if(plantLightOn && plantLightReading < minLightPlant){
    digitalWrite(plantLed, HIGH);
  }
  


uint8_t bufferCounter = 1;

bool powerIsOn = false;

uint8_t incomingByte;

bool onAuto = true;
#define autoTime 1 //number of hours until auto mode resumes.
unsigned long autoTimer = 0;

//run once on start
void setup() {
  Serial.begin(9600);
  plantLightBuffer[0] = 1791;
