         setTime(h,m,0,d,1,2014);    //hour,min,sec,day,month,year
         t = now();
         tDelay = runInterval;
-        tDelayMin = measureInterval;
-        break;
-      }
-      case 'U':
-      {
-        int k = 0;
-        num_usr_settings = Serial.parseInt(); // The first int is the number
-        while (k < num_usr_settings) {        // of user settings from the user
-          for (int i = 0; i < NUM_SETTINGS; i++) {
-            usrSch[k][i] = Serial.parseInt();
-            Serial.print(usrSch[k][i]);
-            if (i == NUM_SETTINGS - 1) {
-              k++;
-              Serial.println("");
-            }
-            else {
-              Serial.print(",");
-            }
-          }
-        }
-        break;
-      }
-      case 'I':
-      {
-        int k = 0;
-        num_usr_settings_day = Serial.parseInt();
-        while (k < num_usr_settings_day) {
-          for (int i = 0; i < NUM_SETTINGS_DAY; i++) {
-            usrSchInd[k][i] = Serial.parseInt();
-            Serial.print(usrSchInd[k][i]);
-            if (i == NUM_SETTINGS_DAY - 1) {
-              k++;
-              Serial.println("");
-            }
-            else{
-              Serial.print(",");
-            }
-          }
-        }
         break;
       }
     }

#include <Arduino.h>
#include <DHT.h>        // For the DHT11 temperature and humidity sensor
#include <Time.h>       // For timekeeping
#include <Wire.h>       // For I2C

// 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;
const int measureInterval = 3600;


// Define DHT11 sensor
#define DHTPIN 8          // What pin we're connected to
#define DHTTYPE DHT11     // DHT 11
DHT dht(DHTPIN, DHTTYPE); // Make the object

/**
 * User schedule of all settings
 * (7 settings, 1-9 predefined settinggroups, 1-7 days with 1h resolution)
 */
int num_usr_settings = 3;        // Setting sets available (Default: 3)
int num_usr_settings_day = 1;    // Day setting sets available (Default: 1)
const int NUM_SETTINGS = 7;      // Day setting sets
const int NUM_SETTINGS_DAY = 24; // Hour setting sets
// Setting sets
int usrSch[9][NUM_SETTINGS] = {
  {0,0,0,0,15,2,0}, // Spray the roots at a set interval and duration (Default)
  {0,0,0,1,15,2,0}, // Run the pump (Default)
  {0,0,0,0,20,2,0}, // Night setting (Default)
  {25,25,25,0,20,2,0},
  {50,50,50,0,20,2,0},
  {100,100,100,0,20,2,0},
  {100,100,100,0,20,2,0},
  {100,100,100,0,20,2,0},
  {100,100,100,0,20,2,0}
};
// Day setting sets (0:00-23:00)
int usrSchInd[NUM_SETTINGS][NUM_SETTINGS_DAY] = {
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2}, // Pump at 10:00 and 20:00
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2},
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2},
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2},
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2},
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2},
  {2,2,2,2,2,2,2,2,2,2,1,0,0,0,0,0,0,0,0,0,1,2,2,2}
};

// Variables for RGB levels
int rval = 0;
int gval = 0;
int bval = 0;

// Variable for pump
int pumpOn = 0; // 0 off, 1 on
int nozzleInterval = 20; // min interval between nozzle activation >60 == off
int nozzleDuration = 2; // 2 sec active nozzle <0 == off
int fanStatus = 0; // 0 off, 1 on

// Run preprogrammed setup, oneReport after nozzle on
int runProgram = 1;

  timeString = timeString + minute(t);
  timeString = timeString + ":";
  timeString = timeString + second(t);
  timeString = timeString + "\n";

  return timeString;
}
