Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/greenponik/greenponik_thermistor10k
Read temperature on thermistor 10k through Python3 on raspberry pi
https://github.com/greenponik/greenponik_thermistor10k
gardening greenponik grow hydroponics i2c-bus i2c-sensors raspberry-pi temperature
Last synced: 23 days ago
JSON representation
Read temperature on thermistor 10k through Python3 on raspberry pi
- Host: GitHub
- URL: https://github.com/greenponik/greenponik_thermistor10k
- Owner: GreenPonik
- License: mit
- Created: 2020-03-16T11:22:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-15T15:02:23.000Z (about 3 years ago)
- Last Synced: 2024-11-10T19:05:39.755Z (about 1 month ago)
- Topics: gardening, greenponik, grow, hydroponics, i2c-bus, i2c-sensors, raspberry-pi, temperature
- Language: Python
- Homepage: https://greenponik.github.io/GreenPonik_Thermistor10k/
- Size: 3.14 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=alert_status)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=ncloc)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=security_rating)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=GreenPonik_GreenPonik_Thermistor10k&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=GreenPonik_GreenPonik_Thermistor10k)![Upload Python Package](https://github.com/GreenPonik/GreenPonik_Thermistor10k/workflows/Upload%20Python%20Package/badge.svg?event=release)
![Python package](https://github.com/GreenPonik/GreenPonik_Thermistor10k/workflows/Python%20package/badge.svg?event=push)## GreenPonik_Thermistor10k.py Library for Raspberry pi
---
This is the code for read temperature with thermistor 10k sensor on i2c bus.
## Table of Contents
- [GreenPonik_Thermistor10k.py Library for Raspberry pi](#greenponikthermistor10kpy-library-for-raspberry-pi)
- [Table of Contents](#table-of-contents)
- [Dev workflow](#dev-workflow)
- [Installation](#installation)
- [Methods](#methods)
- [Example](#example)
- [Credits](#credits)## Dev workflow
create python virtual environnement
```shell
python3 -m venv venv
```activate venv linux
```shell
source venv/bin/activate
```activate venv windows
```
venv\Scripts\activate
```install dependencies
```shell
pip install -r requirements.txt
```install dependencies for the documentation
```shell
pip install Sphinx sphinx-press-theme m2r2
```build documentation
```shell
cd docs/ && make clean html
```## Usage Workflow
### Installation
```shell
> git clone https://github.com/GreenPonik/GreenPonik_Thermistor10k.git
cd GreenPonik_Thermistor10k
pip3 install -r requirements.txtor
> pip install greenponik-thermistor10k
``````Python
from GreenPonik_Thermistor10k.Thermistor10k import Thermistor10k
```
### Methods
```python
"""
Get temperatue in celcius
"""
def read_temp():```
### Example
```Python
import time
from GreenPonik_Thermistor10k.Thermistor10k import Thermistor10kif __name__ == "__main__":
try:
th = Thermistor10k()
th.debug = True # used for debug
while True:
temperature = th.read_temp()
print("celcius temp %.3f °c" % temperature)
time.sleep(1)
except Exception as e:
print("oops there is an exception {}".format(e))```
## Credits
Write by Mickael Lehoux, from [GreenPonik](https://www.greenponik.com), 2020