pyupm_lm35 module

class pyupm_lm35.LM35(pin, aref=5.0)[source]

Bases: object

API for the DFRobot LM35 Linear Temperature Sensor.

ID: lm35

Name: Analog Temperature Sensor

Other Names: LM35

Category: temp

Manufacturer: dfrobot

Link:http://www.dfrobot.com/index.php?route=product/product&product_id=76

Connection: analog This sensor returns an analog voltage proportional to the temperature of the ambient environment.

It has a range of 2C to 150C.

This driver was developed using the DFRobot LM35 Linear Temperature Sensor

C++ includes: lm35.hpp

getTemperature()[source]

float getTemperature()

Returns the temperature in degrees Celsius

The Temperature in degrees Celsius

setOffset(offset)[source]

void setOffset(float offset)

Set sensor offset. This offset is applied to the return values before scaling. Default is 0.0.

offset: Offset to apply.

setScale(scale)[source]

void setScale(float scale)

Set sensor scale. This scale is applied to the return values before the offset is applied. Default is 1.0.

scale: Scale to apply.