GreenPonik_Thermistor10k package

GreenPonik_Thermistor10k.Thermistor10k module

Description

GreenPonik_thermistor_10k Read temperature on thermistor 10kwith Python3 through i2c

class GreenPonik_Thermistor10k.Thermistor10k.Thermistor10k(bus=1, addr=72)

Bases: object

DEFAULT_ADDR = 72
DEFAULT_BUS = 1
THERMISTOR_OFFSET = 2000
_steinhart_temperature(r, ro=10000.0, to=25.0, beta=3950.0) float

steinhart formula for thermistor resistance conversion to celcius degrees

Parameters
  • r – thermistor calculated resistance

  • ro – thermistor resistance @25°c

  • beta – thermistor coefficient from data sheet

Raises

Exception: Global Exception

Returns

Steinhart temperature

Return type

float

property address

getter i2c address of the device

Returns:

int: i2c address of the device on the i2c bus

property ads_channel_read

getter reads from ads channel selected

Returns:

int: analog value from 0 to 32767

property ads_channel_selector

getter channel of the ADS

Returns:

Int: Number of the channel

property ads_instance

getter ads instance

Returns:

ADS_1115: ads instance

property bus

getter i2c bus number currently used

Returns:

int: the i2c bus number

property debug

debug property

Getter

debug flag

Setter

change debug flag

Returns:

bool: True if the debug mode is ON, False if not

property gain
Returns

get the current used gain on ADS

Return type

int

property gains

getter gains

Returns:

list: list of possible gain available on the ADS

property i2c

getter i2c bus instance

Returns:

ExtendedI2C: i2c bus instance

read_temp() float

Read thermistor 10k temperature on raspberry pi i2c bus Get temperatue in celcius

Raises

Exception: Global Exception

Returns

Temperature from Thermistor 10k

Return type

float