   reportValues = reportValues + nozzleDuration;
   reportValues = reportValues + ",";
   reportValues = reportValues + fanStatus;
-  
-  reportValues = timeReport() + "S" + sensorTempData[0] + "," + sensorTempData[1] + "," 
-                                    + sensorTempData[2] + "," + sensorTempData[3] + "," 
+
+  reportValues = timeReport() + "S" + sensorTempData[0] + "," + sensorTempData[1] + ","
+                                    + sensorTempData[2] + "," + sensorTempData[3] + ","
                                     + sensorTempData[4] + reportValues;
   Serial.println(reportValues);
 }
 
-String timeReport()
-{
+void setLight()
+{
+  //Set LED (value between 0 and 255)
+  analogWrite(RED, rval);
+  analogWrite(GREEN, gval);
+  analogWrite(BLUE, bval);
+}
+
+/**
+ * Turn the pump on or off depending on the value of the global variable pumpOn.
+ */
+void setPump() {
+  if (pumpOn == 1) {
+    digitalWrite(PUMP, HIGH);
+  }
+  if (pumpOn == 0) {
+    digitalWrite(PUMP, LOW);
+  }
+}
+
+void setNozzle()
+{
+  if(nozzleDuration == 0)
+  {
+    digitalWrite(NOZZLE, LOW);
+  }
+}
+
+void setFan(int setStatus)
+{
+  if(setStatus == 1)
+  {
+    digitalWrite(FAN, HIGH);
+  }
+  if(setStatus == 0)
+  {
+    digitalWrite(FAN, LOW);
+  }
+}
+
+String timeReport() {
   String timeString;
-  
+
   timeString = "T";
   timeString = timeString + day(t);
   timeString = timeString + ":";

    }
}

void scheduleFromUser()
{
  //Change every hour
  int x = hour(t); //0-23
  int y = day(t) % num_usr_settings_day; // rotate the days
  int z = usrSchInd[y][x];
  
  rval = usrSch[z][0];
  gval = usrSch[z][1];
  bval = usrSch[z][2];
  pumpOn = usrSch[z][3];
  nozzleInterval = usrSch[z][4];
  nozzleDuration = usrSch[z][5]; 
  fanStatus = usrSch[z][6];
}

void setLight()
{
  //Set LED (value between 0 and 255)
  analogWrite(RED, rval);
  analogWrite(GREEN, gval);
  analogWrite(BLUE, bval);
}

void setPump()
{
  //Set pump (value 1 or 0)
  if (pumpOn == 1){
    digitalWrite(PUMP, HIGH);
  }
  if (pumpOn == 0){
    digitalWrite(PUMP, LOW);
  }
}

void setNozzle()
{
  if(nozzleDuration == 0)
  {
    digitalWrite(NOZZLE, LOW);
  }
}

void setFan(int setStatus)
{
  if(setStatus == 1)
  {
    digitalWrite(FAN, HIGH);
  }
  if(setStatus == 0)
  {
    digitalWrite(FAN, LOW);
  }
}

void serialReport()
{
  String reportValues;
  
  reportValues = "R";
  reportValues = reportValues + rval;
  reportValues = reportValues + ",";

/*
 * Work in progress
 */
#include <DHT.h>        // For the DHT11 temperature and humidity sensor
#include <Time.h>       // For timekeeping
#include <Wire.h>       // For I2C
#include <avr/eeprom.h> // For storing calibration and configration in EEPROM


//Define LED pins (PWM pins: 3,5,6,9,10,11 on arduino UNO)
const int RED   = 11;
const int GREEN = 10;
const int BLUE  = 9;
const int PUMP  = 2;
const int NOZZLE = 12;
const int FAN = 7;
const int BOARDLED = 13; //Pin 13 and Arduino UNO board LED
const int LIGHT = A0;           // Light sensor, Analog pin 0
const int runInterval = 1;      // Define delay between the run and measure interval in seconds
