we are using the temperature and humidity Sensor DHT22 - white one, aka DHT Pro or AM2302 and the Grove-LCD RGB Blacklight Display and followed the instruction of the tutorial on Dexter. We also adapted the script for our sensor but the contrast of the text of the display is too low and barely readable, because the backlight is too high and seems to flash all the time.
We used this script:
from grovepi import * from grove_rgb_lcd import * dht_sensor_port = 7 # Connect the DHt sensor to port 7 dht_sensor_type = 1 # change this depending on your sensor type - see header comment while True: try: [ temp,hum ] = dht(dht_sensor_port,dht_sensor_type) #Get the temperature and Humidity from the DHT sensor print("temp =", temp, "C\thumidity =", hum,"%") t = str(temp) h = str(hum) setRGB(0,128,64) setRGB(0,255,0) setText("Temp:" + t + "C " + "Humidity :" + h + "%") except (IOError,TypeError) as e: print("Error")
The examples of the scripts in the following folder GrovePi/Software/Python/grove_rgb_lcd worked well, so the problem might be with the script.
We don’t know how to continue so please help us!