Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.txt

or

> 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 Thermistor10k

if __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