Giter Site home page Giter Site logo

micropython-sht11's Introduction

micropython-sht11

based on : https://github.com/ayoy/upython-aq-monitor

Board Supported

Test on ESP32 (Lolin32 Lite)

How to Use

from sht11 import SHT11

#pin sck and data used, change with yours
sht = SHT11(sck=26, data=33)

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

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

micropython-sht11's People

Contributors

2black0 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

micropython-sht11's Issues

not working with Lolin32 lite and Raspberry Pi Pico

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:**

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.