UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

LM35 Class

Module: lm35

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
lm35.jpg

Item Index

Methods

LM35

(
  • pin
  • aref
)
Number

LM35 constructor

Parameters:

  • pin Number

    Analog pin to use

  • aref Number

    Analog reference voltage; default is 5.0 V

Returns:

Number:

getTemperature

() Number

Returns the temperature in degrees Celsius

Returns:

Number:

The Temperature in degrees Celsius

setScale

(
  • scale
)

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

Parameters:

  • scale Number

    Scale to apply.

setOffset

(
  • offset
)

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

Parameters:

  • offset Number

    Offset to apply.