Hi people,
I am trying to do a very simple temperature monitoring device using the Raspberry Pi 3B+, Grove base Hat, Grove Temperature sensor DHT11 and Grove 16x2 LCD display. The sensor and LCD display are connected to the Grove base hat via ports D5 and I2C .
http://wiki.seeedstudio.com/Grove_Base_Kit_for_Raspberry_Pi/
I have managed to get the sensor data and display the readings on the LCD.
Using an Android phone, I have successfully linked the Blynk app to my RPi by following all the installation instructions.
However, I have tried all digital GPIO pin configurations and am unable to display the temperature data on the Blynk app.
Are there any additional library I need to import or modifications required to the python code below?
Thank you
import datetime
import time
from grove.grove_temperature_humidity_sensor import DHT
from grove.display.jhd1802 import JHD1802
def main():
# Grove - 16x2 LCD(White on Blue) connected to I2C port
lcd = JHD1802()
# Grove - Temperature&Humidity Sensor connected to port D5
sensor = DHT('11', 5)
while True:
#Grove HAT with external temperature sensor DHT11 and external LCD display#
humi, temp1 = sensor.read()
temp1 = round(temp1, 1)
humi = round(humi, 1)
print("-------------------")
print("Date & Time:", datetime.datetime.now())
print("Temperature =", temp1, chr(176),"C")
# print("Humidity =", humi,"%")
print("")
lcd.setCursor(0, 0)
lcd.write('Temperature: {0:1}C'.format(temp1))
lcd.setCursor(1, 0)
lcd.write(datetime.datetime.now().strftime('%d %b %H:%M:%S'))
time.sleep(3)
if __name__ == '__main__':
main()