 {
   return (in_min - x) * out_max / (in_min - in_max);
 }
+
+/*
+Watering Details
+Watering time                  15 seconds
+Estimated amount per watering   6 oz
+Water tank capacity            64 oz
+Watering Frequency             Every twelve hours (twice daily)
+Estimated watering for         About 5 days
+*/
+
 
 /*
 const int moistureMaxVal = 453;

//===== For water pump ===========================
const byte waterPumpPin = A5;
// todo - find right value for this
const int waterLevelThreshold = 20; // <- made this up    
boolean waterPumpIsOn = false;
unsigned long wateringSeconds = 30000;
unsigned long prevWatering = 0;
int waterMaxVal = 450;
int waterMinVal = 325;   

//===== For timed events =========================
// todo - timed events use regule marers for 1 min 1 hour etc and divide blah
unsigned long prevMinOneMillis = 0;    
unsigned long minOneInterval = 60000;
unsigned long prevMinFiveMillis = 0;
unsigned long minFiveInterval = 300000;
unsigned long prevHourTwelveMillis = 0;
unsigned long hourTwelveInterval = 43200000;

void setup() {
  pinMode(lightSwitchPin, OUTPUT);

}

void sendToKeen() {  
  Console.print("| Sending data to Keen.io\t\t\t|");
  String my_output = "{";
  // strings
  my_output += "\"AppId\":\"";                      my_output += appId;             my_output += "\"";
