NAME

Device::Temperature::TMP102 - I2C interface to TMP102 temperature sensor using Device::SMBus

SOURCE

With code and comments taken from example code for the ATmega328:

  https://www.sparkfun.com/products/11931

  http://www.sparkfun.com/datasheets/Sensors/Temperature/tmp102.zip

  /*
    TMP Test Code
	5-31-10
    Copyright Spark Fun Electronics© 2010
    Nathan Seidle

	Example code for the TMP102 11-bit I2C temperature sensor

	You will need to connect the ADR0 pin to one of four places. This
	code assumes ADR0 is tied to VCC.  This results in an I2C address
	of 0x93 for read, and 0x92 for write.

	This code assumes regular 12 bit readings. If you want the
	extended mode for higher temperatures, the code will have to be
	modified slightly.

  */

VERSION

ATTRIBUTES

I2CDeviceAddress

Contains the I2CDevice Address for the bus on which your TMP102 is connected. The default value is 0x48.

METHODS

getTemp()

$self->getTemp()

Returns the current temperature, in degrees Celsius.

convertTemp()

$self->convertTemp( $reading )

Given a value read from the TMP102, convert the value to degrees Celsius.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 99:

Non-ASCII character seen before =encoding in 'Electronics©'. Assuming UTF-8