Read temperature on thermistor 10k through Python3 on raspberry pi
Project description
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
- GreenPonik_Thermistor10k.py Library for Raspberry pi
- Table of Contents
- Dev workflow
- Installation
- Methods
- Example
- Credits
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for greenponik-thermistor10k-0.0.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07991e3341d6bcf0796a6142e815e67abd4b217f52403e574004d45026936abf |
|
MD5 | 1f38945f7eff0104c85ff386333d57ae |
|
BLAKE2b-256 | 37c8cabdf65c894fd686955e162bca32ffa52560d1af7e5dea0fd96250c0e214 |
Close
Hashes for greenponik_thermistor10k-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d990ebe8c5ffeb93a6a8749667ecdb56a87f775bcb8a97dc9d13ea1f92f8abcb |
|
MD5 | bc4c9208ad0f0998419ebd303a99208b |
|
BLAKE2b-256 | 45daed2097a751b452df3e087c7ca4c06e3eaaf392a5f901962f274f82fac05d |