Coder Social home page Coder Social logo

tannewt / adafruit_circuitpython_si7021 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adafruit/adafruit_circuitpython_si7021

0.0 3.0 0.0 39 KB

CircuitPython driver for the Si7021 temperature and humidity sensor

License: MIT License

Python 100.00%

adafruit_circuitpython_si7021's Introduction

Introduction

Documentation Status

Discord

Dependencies

This driver depends on the Bus Device library. Please ensure is is also available on the CircuitPython filesystem. This is easily achieved by downloading a library and driver bundle.

Usage Notes

Of course, you must import the library to use it:

import adafruit_si7021

This driver takes an instantiated and active I2C object (from the busio or the bitbangio library) as an argument to its constructor. The way to create an I2C object depends on the board you are using. For boards with labeled SCL and SDA pins, you can:

from busio import I2C
from board import SCL, SDA

i2c = I2C(SCL, SDA)

Once you have created the I2C interface object, you can use it to instantiate the sensor object:

sensor = adafruit_si7021.SI7021(i2c)

And then you can start measuring the temperature and humidity:

print(sensor.temperature)
print(sensor.relative_humidity)

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

API Reference

api

adafruit_circuitpython_si7021's People

Contributors

tannewt avatar mrmcwethy avatar deshipu avatar tdicola avatar

Watchers

 avatar James Cloos avatar  avatar

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.