Run the following commands to install required packages:
sudo apt-get install i2c-tools
sudo apt-get install python-smbus
When connected as above, the TMP102 uses the I2C address 0x48. To confirm this, run the following at the command line:
i2cdetect -y 2
The resulting diagram should show the device at 0x48 by printing 48 in the corresponding cell.
Note that the SCL and SDA pins on the pcDuino are connected to I2C bus 2.
The TMP102 breakout board has built-in 1k pull-up resistors on the SDA and SCL lines; it works without external pull-up resistors.
bus = smbus.SMBus(2)
data = bus.read_i2c_block_data(0x48, 0)
msb = data
lsb = data
# Print degrees Celsius
print (((msb << 8) | lsb) >> 4) * 0.0625