2black0 / micropython-sht11

sht11 module for micropython
MIT License
2 stars 2 forks source link

not working with Lolin32 lite and Raspberry Pi Pico #1

Open bigplik opened 3 years ago

bigplik commented 3 years ago

Hi, not sure what's wrong, but your library not working both, with my Lolin32 lite and Raspberry Pi Pico.

my code is

    import machine, sht11
    from sht11 import SHT11
    from machine import Pin

    #pin sck and data used, change with yours
    sht = SHT11(sck=21, data=20)

    #read temperature and humidity
    tempOut = sht.temperature()
    humOut = sht.humidity()

    #print temperature and humidity
    print('Temperature: ', tempOut, '*C')
    print('Humidity: ', humOut, '%')

i've got that return

          **Traceback (most recent call last):
            File "<stdin>", line 10, in <module>
            File "sht11.py", line 49, in temperature
            File "sht11.py", line 86, in __send_command
            File "sht11.py", line 168, in __ack_bit
          AckException:**
2black0 commented 3 years ago

thanks for your report, will try to check and fix it