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)
		time.sleep(.1)
		if number == -1:
			return -1
	except (TypeError, __HOLE__):
		return -1
	# data returned in IEEE format as a float in 4 bytes
	
	if p_version==2:
		h=''
		for element in (number[1:5]):
			h+=chr(element)
			
		t_val=struct.unpack('f', h)
		t = round(t_val[0], 2)

		h = ''
		for element in (number[5:9]):
			h+=chr(element)
		
		hum_val=struct.unpack('f',h)
		hum = round(hum_val[0], 2)
	else:
		t_val=bytearray(number[1:5])
		h_val=bytearray(number[5:9])
		t=round(struct.unpack('f',t_val)[0],2)
		hum=round(struct.unpack('f',h_val)[0],2)
	return [t, hum]

# Grove LED Bar - initialise
# orientation: (0 = red to green, 1 = green to red)
dataset/ETHPy150Open DexterInd/GrovePi/Firmware/Source/v1.2/grove_pi_v1_2_6/grovepi.py/dht