def dht(pin, module_type):
	write_i2c_block(address, dht_temp_cmd + [pin, module_type, unused])

	# Delay necessary for proper reading fron DHT sensor
	time.sleep(.6)
	try:
		read_i2c_byte(address)
		number = read_i2c_block(address)
		if number == -1:
			return -1
	except (TypeError, IndexError):
		return -1
	# data returned in IEEE format as a float in 4 bytes
	f = 0
	# data is reversed
	for element in reversed(number[1:5]):
		# Converted to hex
		hex_val = hex(element)
		#print hex_val
		try:
			h_val = hex_val[2] + hex_val[3]
		except IndexError:
			h_val = '0' + hex_val[2]
		# Convert to char array
		if f == 0:
			h = h_val
			f = 1
		else:
			h = h + h_val
	# convert the temp back to float
	t = round(struct.unpack('!f', h.decode('hex'))[0], 2)

	h = ''
	# data is reversed
	for element in reversed(number[5:9]):
		# Converted to hex
		hex_val = hex(element)
		# Print hex_val
		try:
			h_val = hex_val[2] + hex_val[3]
		except __HOLE__:
			h_val = '0' + hex_val[2]
		# Convert to char array
		if f == 0:
			h = h_val
			f = 1
		else:
			h = h + h_val
	# convert back to float
	hum = round(struct.unpack('!f', h.decode('hex'))[0], 2)
	return [t, hum]


# Grove LED Bar - initialise
# orientation: (0 = red to green, 1 = green to red)
dataset/ETHPy150Open DexterInd/GrovePi/Script/multi_grovepi_installer/grovepi6.py/dht