Example #1
0
def log_data(plant_num, sensor_value):
  print "H2OIQ.log: logging " + sensor_value + " for plant " + plant_num
  oclock = str(time.time())
  touch(log_data_file(plant_num))
  lf = open(log_data_file(plant_num), "a")
  lf.write(oclock + " " + sensor_value + "\n")
  lf.close()
Example #2
0
def log_data(plant_num, sensor_value):
  oclock = time.time()
  lf = open(log_data_file(plant_num) + '.log.fake', "a")
  lf.write(str(oclock) + " " + sensor_value + "\n")
  lf.close()