def read_sensor():
	try:
		# pressure=pressure = bmp.readPressure()/100.0
		light=grovepi.analogRead(light_sensor)
		[temp,humidity] = grovepi.dht(temp_humidity_sensor,therm_version)	# Here we're using the thermometer version.
		#Return -1 in case of bad temp/humidity sensor reading
		if math.isnan(temp) or math.isnan(humidity):		#temp/humidity sensor sometimes gives nan
			# return [-1,-1,-1,-1]
			return [-1,-1,-1]
		# return [pressure,light,temp,humidity]
		return [light,temp,humidity]
	
	#Return -1 in case of sensor error
	except (__HOLE__,TypeError) as e:
			return [-1,-1,-1]
			# return [-1,-1,-1,-1]

#Take a picture with the current time using the Raspberry Pi camera. Save it in the same folder.
dataset/ETHPy150Open DexterInd/GrovePi/Projects/weather_station/weather_station-White_Temp_Sensor.py/read_sensor