[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=alert_status)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=ncloc)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=security_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_SHT40&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_SHT40)
![Upload Python Package](https://github.com/GreenPonik/GreenPonik_SHT40/workflows/Upload%20Python%20Package/badge.svg?event=release)
![Python package](https://github.com/GreenPonik/GreenPonik_SHT40/workflows/Python%20package/badge.svg?event=push)
## GreenPonik_SHT40.py Library for Raspberry pi
---------------------------------------------------------
This is the sample code for read light with SHT40 sensor.
## Table of Contents
- [GreenPonik_SHT40.py Library for Raspberry pi](#GreenPonikSHT40py-library-for-raspberry-pi)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Methods](#methods)
- [Examples](#examples)
- [Credits](#credits)
## Installation
```shell
> git clone https://github.com/GreenPonik/GreenPonik_SHT40.git
cd GreenPonik_SHT40
pip3 install -r requirements.txt
or
> pip3 install greenponik-sht40
```
```Python
from GreenPonik_SHT40.SHT40 import SHT40
```
## Methods
```python
"""
Get light data
"""
def read_sht40():
```
## Example
```Python
import time
from GreenPonik_SHT40.SHT40 import SHT40
if __name__ == "__main__":
try:
sht = SHT40()
while True:
data = sht.read_sht40()
print("temperature: %.2f / humidity: %.2f" % (data[0], data[1]))
time.sleep(1)
except Exception as e:
print('An exception occurred: {}'.format(e))
```
## Credits
Code by Mickael Lehoux, from [GreenPonik](https://www.greenponik.com), 2021
没有合适的资源?快使用搜索试试~ 我知道了~
GreenPonik_SHT40
共76个文件
png:23个
js:8个
py:7个
4星 · 超过85%的资源 需积分: 48 17 下载量 91 浏览量
2021-02-26
19:12:06
上传
评论
收藏 182KB ZIP 举报
温馨提示
Raspberry pi的GreenPonik_SHT40.py库 这是用于SHT40传感器的阅读灯的示例代码。 目录 安装 > git clone https://github.com/GreenPonik/GreenPonik_SHT40.git cd GreenPonik_SHT40 pip3 install -r requirements.txt or > pip3 install greenponik-sht40 from GreenPonik_SHT40 . SHT40 import SHT40 方法 """ Get light data """ def read_sht40 (): 例子 import time from GreenPonik_SHT40 . SHT40 import SHT40 if __name__ == "__main__" : try :
资源推荐
资源详情
资源评论
收起资源包目录
GreenPonik_SHT40-master.zip (76个子文件)
GreenPonik_SHT40-master
MANIFEST.in 734B
.github
workflows
stale.yml 440B
python-publish.yml 896B
greetings.yml 367B
label.yml 486B
python-package.yml 1KB
requirements.txt 169B
tox.ini 2KB
example
read_sht40_data.py 363B
LICENSE 1KB
setup.cfg 200B
setup.py 2KB
README.md 3KB
Makefile 70B
.sonarcloud.properties 24B
.pypirc 172B
GreenPonik_SHT40
__init__.py 0B
SHT40.py 2KB
Doxyfile 113KB
docs
html
doc.png 746B
tab_a.png 142B
sync_on.png 845B
folderopen.png 597B
index.html 3KB
open.png 123B
pages.html 3KB
tab_h.png 177B
folderclosed.png 616B
nav_h.png 98B
search
all_0.js 80B
search_l.png 567B
search_m.png 158B
nomatches.html 462B
all_0.html 1KB
search.css 4KB
search.js 23KB
pages_0.html 1KB
close.png 273B
close.svg 1KB
mag_sel.svg 2KB
searchdata.js 167B
search_r.png 553B
pages_0.js 80B
mag_sel.png 465B
nav_g.png 95B
doxygen.png 4KB
bdwn.png 147B
doxygen.svg 15KB
splitbar.png 314B
dynsections.js 4KB
menu.js 3KB
jquery.js 171KB
tab_s.png 184B
menudata.js 1KB
bc_s.png 676B
md__r_e_a_d_m_e.html 7KB
doxygen.css 30KB
sync_off.png 853B
closed.png 132B
tabs.css 9KB
nav_f.png 153B
tab_b.png 169B
latex
make.bat 712B
doxygen.sty 14KB
longtable_doxygen.sty 12KB
refman.tex 5KB
md__r_e_a_d_m_e.tex 3KB
Makefile 544B
tabu_doxygen.sty 115KB
_config.yml 25B
tests
test_SHT40.py 1KB
__init__.py 0B
.gitignore 182B
version.py 25B
_config.yml 272B
pyproject.toml 310B
共 76 条
- 1
资源评论
- zcyxh123452024-06-26无用的信息
- qq_405450762021-08-06用户下载后在一定时间内未进行评价,系统默认好评。
林文曦
- 粉丝: 29
- 资源: 4719
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功