Skip to main content

Read temperature on thermistor 10k through Python3 on raspberry pi

Project description

Quality Gate Status Maintainability Rating

Lines of Code Duplicated Lines (%)

Reliability Rating Security Rating Vulnerabilities

Upload Python Package Python package

GreenPonik_Thermistor10k.py Library for Raspberry pi


This is the sample code for read temperature with thermistor 10k sensor on i2c bus.

Table of Contents

Dev workflow

create python virtual environnement

python3 -m venv venv

activate venv linux

source venv/bin/activate

activate venv windows

venv\Scripts\activate

install dependencies

pip install -r requirements.txt

build the documentation

TODO

Installation

> git clone https://github.com/GreenPonik/GreenPonik_Thermistor10k.git
cd GreenPonik_Thermistor10k
pip3 install -r requirements.txt

or 

> pip install greenponik-thermistor10k
from GreenPonik_Thermistor10k.Thermistor10k import Thermistor10k

Methods

"""
Get temperatue in celcius
"""
def read_temp():

Example

import time
from GreenPonik_Thermistor10k.Thermistor10k import Thermistor10k


if __name__ == "__main__":
    th = Thermistor10k()
    while True:
        temperature = th.read_temp()
        print("celcius temp %.3f °c" % temperature)
        time.sleep(1)

Credits

Write by Mickael Lehoux, from GreenPonik, 2020

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenponik-thermistor10k-0.0.16.tar.gz (36.5 kB view hashes)

Uploaded Source

Built Distribution

greenponik_thermistor10k-0.0.16-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page