   mystr += "},{'sensor':'lightSwitch', 'type': 'lightswitch', 'value':";
   mystr += powerIsOn;
   
-  
   mystr += "}]}]";
   Serial.println(mystr);
 }

       powerIsOn = true;
    }
  }
}

uint8_t warnings[] = {0, 0, 0, 0,
//turns on warning leds, should later control temperature.
void SendCommands(){
//  sensor operation
//  lighting
  if(powerIsOn && aquaLightReading < minLightAqua){
    digitalWrite(warningLights[warningIndex, HIGH);
    warningIndex++;
  } else if(warnings[0] = 1;
    digitalWrite(warningLights[warningIndex], LOW);
    warningIndex++;
  }
  if(powerIsOn && plantLightReading < minLightPlant){
    digitalWrite(warningLights[warningIndex, HIGH);
    warningIndex++;
  } else if(warnings[1] = 1;
    digitalWrite(warningLights[warningIndex], LOW);
    warningIndex++;
  }
  
  //water temperature
  float tempDifference = targetTemperature > waterTempReading ? targetTemperature - waterTempReading : waterTempReading - targetTemperature;
  if(tempDifference > temperatureVarience){
    digitalWrite(tempLed, HIGH);
  }

  //water turbidity
  float turbDifference = targetTurbidity > waterTurbReading ? targetTurbidity - waterTurbReading : waterTurbReading - targetTurbidity;
  if(turbDifference > turbidityVarience){
    digitalWrite(turbLed, HIGH);
  }

//  water temp modifications
}

//Script I found online and modifed using the OneWire library, returns the temperature in fahrenheit.


//analog pins
#define plantLight A0
#define aquaLight A3
#define waterTurbSensor A1
#define ovenTempSensor A4

//digital pins  
OneWire  ds(2); //water temp sensor
#define RELAY1 3

bool powerIsOn = true;

uint8_t incomingByte;

//run once on start
void setup() {
  Serial.begin(9600);
  pinMode(RELAY1, OUTPUT);
  digitalWrite(RELAY1, HIGH);
}

//main program loop.
void loop() {
  SendData();
  GetInput();
}

/*these will be raw readings, converting from voltage to 
