pyupm_temperature module

class pyupm_temperature.Temperature(pin, scale=1.0, r0=100000, b=4275)[source]

Bases: object

API for NTC Temperature Sensors.

ID: temperature

Name: Analog Temperature Sensor

Other Names: Grove Temperature Sensor

Category: temp

Manufacturer: seeed

Link:http://wiki.seeed.cc/Grove-Temperature_Sensor_V1.2/

Connection: analog

Kit: gsk Basic UPM module for analog temperature sensors. These sensors use a NTC thermistor to measure ambient temperature. This driver was developed using the Grove Temperature Sensor. The conversion formula has been updated to work with versions 1.1 and 1.2 of the sensor. For the older v1.0 sensor you will have to specify R0 and B values when initializing the device. The range of this sensor is -40 to 125 C and accuracy is +/- 1.5 C.

C++ includes: temperature.hpp

name()[source]

std::string name()

Provided for compatibility with old grove base class

Sensor name

raw_value()[source]

float raw_value()

Gets the raw value from the AIO pin

Raw value from the ADC

value()[source]

int value()

Gets the temperature in Celsius from the sensor

Normalized temperature in Celsius