 /////////////////////////////////////////////////////////////////////////////
 // sensor/actuator stuff ////////////////////////////////////////////////////
 void startPeripherals() {
-  mySwitch.enableTransmit(13);   // RC Transmitter is connected to Pin #13  
+  mySwitch.enableTransmit(13);   // RC Transmitter is connected to Pin #13
+  
   tempSensor.begin();     // Start the onewire temperature sensor
   tempSensor.getAddress(tempAddr, 0);
   tempSensor.setResolution(tempAddr, 12);    // set the resolution to 12 bit (DS18B20 goes from 9-12 bit)
+  
+  dht.begin();    // Start the humidity and air temperature sensor
+
+  // You can change the gain of the light sensor on the fly, to adapt to brighter/dimmer light situations
+  //tsl.setGain(TSL2591_GAIN_LOW);    // 1x gain (bright light)
+  tsl.setGain(TSL2591_GAIN_MED);      // 25x gain
+  //tsl.setGain(TSL2591_GAIN_HIGH);   // 428x gain
+  
+  // Changing the integration time gives you a longer time over which to sense light
+  // longer timelines are slower, but are good in very low light situtations!
+  //tsl.setTiming(TSL2591_INTEGRATIONTIME_100MS);  // shortest integration time (bright light)
+  //tsl.setTiming(TSL2591_INTEGRATIONTIME_200MS);
+  tsl.setTiming(TSL2591_INTEGRATIONTIME_300MS);
+  //tsl.setTiming(TSL2591_INTEGRATIONTIME_400MS);
+  //tsl.setTiming(TSL2591_INTEGRATIONTIME_500MS);
+  //tsl.setTiming(TSL2591_INTEGRATIONTIME_600MS);  // longest integration time (dim light)
+
+  tsl.begin();    // Start the light sensor
 }
 
 void updateSensorData(monitor_t *monitorData) {

  buf->concat(", Water Temp: ");
  buf->concat(m.waterCelsius);
  buf->concat(" °C");
}
void getTemperature(float* waterCelsius) {
  float _waterCelsius = *waterCelsius;
  tempSensor.requestTemperatures(); // Send the command to get temperatures
  Serial.println("Temp requested from sensor");
  _waterCelsius = (tempSensor.getTempC(tempAddr));
  Serial.print("Temp: ");
  Serial.print(_waterCelsius);
  Serial.println(" C, ");
  *waterCelsius = _waterCelsius;
  return;
}


#include <DNSServer.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2591.h>
#include <RCSwitch.h>

/////////////////////////////////////////////////////////////////////////////
