Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billyrayvalentine/micropython-Si70xx
A MicroPython library for the I2C Silicon Labs Si70xx series of relative humidity and temperature sensors
https://github.com/billyrayvalentine/micropython-Si70xx
Last synced: about 16 hours ago
JSON representation
A MicroPython library for the I2C Silicon Labs Si70xx series of relative humidity and temperature sensors
- Host: GitHub
- URL: https://github.com/billyrayvalentine/micropython-Si70xx
- Owner: billyrayvalentine
- License: mit
- Created: 2017-01-12T18:04:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-12T18:12:23.000Z (almost 8 years ago)
- Last Synced: 2024-04-22T13:30:45.004Z (7 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - micropython-Si70xx - Silicon Labs Si70xx series of relative humidity and temperature sensors, I2C interface. (Libraries / Sensors)
- awesome-mpython - micropython-Si70xx - Silicon Labs Si70xx series of relative humidity and temperature sensors, I2C interface. (精选驱动库 / 传感器)
README
README.md
# micropython-Si70xx
A MicroPython library for the I2C [Silicon Labs Si70xx](http://www.silabs.com/products/sensors/humidity-sensors/Pages/default.aspx) series of relative humidity and temperature sensors.
This library should work with the Si7006 Si7013 Si7020 Si7021 Si7034This class is a subclass of the [billyrayvalentine/micropython-Si705x] (https://github.com/billyrayvalentine/micropython-Si705x) and must therefor be available to Micropython.
**This module has currently only been tested on the Si7021. Please report your milage**
# Methods
There are only four methods:```get_temperature``` - Perform a measurement and return the temperature in Celsius
```get_humidity``` - Perform a measurement and return the relative humidity percentage
```get_model``` - Return the hardware model e.g. Si7021
```get_firmware_version``` - Return the hex value of the firmware version
# Example in REPL
```python
>>> from machine import Pin, I2C
>>> from Si70xx import Si70xx
>>> i2c = I2C(scl=Pin(5), sda=Pin(4))
>>> sensor = Si70xx(i2c)
>>> sensor.get_temperature()
23.64604
>>> sensor.get_humidity()
41.74857
>>> sensor.get_model()
'Si7021'
>>> sensor.get_firmware_version()
'0x20'```
# License
MIT