Hardware Reference
In-Depth Information
To connect this device to the Raspberry Pi, you'll first need to solder wires to the
TMP102 breakout pins that you are using (GND, SCL, SDA, and V+).
See “Soldering Reminders” on page 42 for some basic soldering tips.
If you are lazy, you can use male jumper wires and bend them tightly to make the
connection, but this is really sloppy and hackish, even for a Hacks topic. Either way,
once you have wires coming off the TMP102 breakout, you need to connect them to
the Raspberry Pi. You can either use jumper wires to connect directly to the appro-
priate GPIO pins, or you can use a Pi Cobbler and a breadboard for the simplest wiring
(see Hack #15 for more about the Pi Cobbler).
To use your TMP102 sensor (and make sure it is working on the Raspberry Pi I2C Bus),
you need to install some software. To install i2ctools and lm-sensors , run the follow-
ing command on Pidora:
$ su -c 'yum install i2c-tools lm_sensors -y'
On Raspbian, run:
$ su -c 'apt-get install i2c-tools lm-sensors'
Now, let's try to find your device on the Raspberry Pi's I2C Bus. To look for the device,
you need to run i2cdetect on bus 1. On the original Raspberry Pi Model B units, this
was bus 0, but with the current hardware, it is bus 1. Bus 0 actually exists on the current
Raspberry Pi Model B, but you have to connect to it via the camera connector. Here's
the i2cdetect command line you want to run:
$ su -c 'i2cdetect -y 1'
You should see output like this:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
 
Search WWH ::




Custom Search