[Errno 5] EIO error, Pico + lcd display + dht11

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

[Errno 5] EIO error, Pico + lcd display + dht11

Post by /RaspberryPi »

Hey everyone, I'm trying to build a little weather station using a dht11 and a pico. I've encountered an error in one of my scripts (main.py):
Traceback (most recent call last): File "", line 8, in File "pico_i2c_lcd.py", line 22, in init OSError: [Errno 5] EIO I haven't found anything to resolve this error.
If anyone has some ideas, please let me know! The script in question:
from machine import Pin import utime as time from pico_i2c_lcd import I2cLcd from machine import I2C from dht import DHT11, InvalidChecksum i2c = I2C(id=1,scl=Pin(27),sda=Pin(26),freq=100000) lcd = I2cLcd(i2c, 0x27, 2, 16) while True: time.sleep(1) pin = Pin(15, Pin.OUT, Pin.PULL_DOWN) sensor = DHT11(pin) t = (sensor.temperature) h = (sensor.humidity) print("Temperature: {}".format(sensor.temperature)) print("Humidity: {}".format(sensor.humidity)) time.sleep(1) lcd.clear() lcd.move_to(0,0) lcd.putstr('Temp :') lcd.move_to(7,0) lcd.putstr(str(t)+" C") lcd.move_to(0,1) lcd.putstr('Humi :') lcd.move_to(7,1) lcd.putstr(str(h)+" %")
submitted by /u/Termite464
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”