 void SendCommands(){
 //  sensor operation
 //  lighting
-  if(leftLightOn && lightL < minLightL){
-    digitalWrite(lLightLed, HIGH);
+  if(aquaLightOn && aquaLightReading < minLightAqua){
+    digitalWrite(aquaLed, HIGH);
   }
-  if(rightLightOn && lightR < minLightR){
-    digitalWrite(rLightLed, HIGH);
+  if(plantLightOn && plantLightReading < minLightPlant){
+    digitalWrite(plantLed, HIGH);
   }
   
   //water temperature
-  float tempDifference = targetTemperature > waterTemp ? targetTemperature - waterTemp : waterTemp - targetTemperature;
+  float tempDifference = targetTemperature > waterTempReading ? targetTemperature - waterTempReading : waterTempReading - targetTemperature;
   if(tempDifference > temperatureVarience){
     digitalWrite(tempLed, HIGH);
   }
 
   //water turbidity
-  float turbDifference = targetTurbidity > waterTurb ? targetTurbidity - waterTurb : waterTurb - targetTurbidity;
+  float turbDifference = targetTurbidity > waterTurbReading ? targetTurbidity - waterTurbReading : waterTurbReading - targetTurbidity;
   if(turbDifference > turbidityVarience){
     digitalWrite(turbLed, HIGH);
   }


#include <OneWire.h>
//L = left sensor, R = right sensor
#define lightSensorR A0
#define lightSensorL A1
OneWire  ds(2); //water temp sensor on digital pin 2
#define waterTurbSensor A3

#define minLightL 0
#define minLightR 0
#define targetTemperature 0
#define temperatureVarience 0
#define targetTurbidity 0
#define turbidityVarience 0

#define lLightLed 13
#define rLightLed 12
#define turbLed 11
#define tempLed 10

float lightR = 0.0;
float lightL = 0.0;
float waterTemp = 0.0;
float waterTurb = 0.0;

uint16_t lightRBuffer[64];
uint16_t lightLBuffer[64];
uint16_t tempBuffer[64];
uint16_t turbBuffer[64];

uint8_t bufferCounter = 1;

bool leftLightOn = false;
bool rightLightOn = false;
bool aquariumLightOn = false;

void setup() {
  Serial.begin(9600);
  lightRBuffer[0] = 1791;
  lightLBuffer[0] = 1792;
  tempBuffer[0] = 1793;
  turbBuffer[0] = 1794;
  pinMode(lLightLed, OUTPUT);
  pinMode(rLightLed, OUTPUT);
  pinMode(turbLed, OUTPUT);
  pinMode(tempLed, OUTPUT);
}

//because this might take to long
void SendData(){
  if(bufferCounter >= 64){
    SendBuffer(plantLightBuffer);
    SendBuffer(aquaLightBuffer);
    SendBuffer(tempBuffer);
    SendBuffer(turbBuffer);
    bufferCounter = 1;
