   byte data[12];
   byte addr[8];
 
-  if ( !ds.search(addr)) {
+  if ( !myPT.search(addr)) {
       //no more sensors on chain, reset search
-      ds.reset_search();
+      myPT.reset_search();
       Serial.println("No probe sensor detected");
       Console.println("No probe sensor detected");
   }

#include "ApiClient.h"
#include "Bridge.h"
#include "Console.h"
#include "DHT.h"
#include "KeenClient.h"
#include "OneWire.h"
#include "params.h"

// hardware
int lightPin = 0; // photoresistor
int hygroPin = 1; // moisture sensor
int dhtPin = 2;   // dht11
int probePin = 3; // temp probe

DHT dht(dhtPin, DHT11);
OneWire ds(probePin);
KeenClient keen;

// todo make this array (of error codes)
//boolean error;

typedef struct my_airmeasurement {
  int humidityAir;
  int tempAirC;
  int tempAirF;
  int heatIndex;
} AirMeasurement;
AirMeasurement am;

typedef struct my_soilmeasurement {
  int tempSoilC;
  int tempSoilF;  
} SoilMeasurement;
SoilMeasurement sm;

int lightResistor;
int moistureSensor;

String appId = "Plant01";
String location = "Dinning Room Window";
boolean lightStatus = false;

  
  // send to keen
  sendToKeen(am, lightResistor, sm);

  // We run this once a minute, approximately
  delay(60000);
}

void waterPlants() {
}

void switchLights() {
}

struct my_airmeasurement getAirMeasurements() {
  AirMeasurement me;
  me.humidityAir = myDHT.readHumidity();
  me.tempAirC = myDHT.readTemperature();
  me.tempAirF = myDHT.readTemperature(true);
  me.heatIndex = myDHT.computeHeatIndex(me.tempAirF, me.humidityAir);
  
  if (me.humidityAir == 0  && me.tempAirC == 0) {
    Serial.println("Failed to read from DHT sensor.");
