Hardware Reference
In-Depth Information
Figure 4-1.
TMP102 and a shiny quarter
Depending on which Linux distribution you are using, you might not have all the drivers
necessary to use the TMP102. Both Raspbian and Pidora are missing the driver for
the TMP102. You can enable the support for this driver if you build a custom kernel
from source, as covered in Hack #22 . Be sure that you have enabled (compiled in)
CONFIG_I2C , CONFIG_I2C_CHARDEV , and CONFIG_I2C_BCM2708 .
Because you will be using the lm_sensors userspace component to get readings from
the TMP102, you will need to be sure to enable “Hardware Monitoring support” ( CON
FIG_HWMON ) under Device Drivers. You also need to have CONFIG_SENSORS_TMP102 enabled
as a module. We will assume that the TMP102 support is present as a module going
forward. Figure 4-2 shows an example of what this option looks like.
Alternatively, Occidentalis supports the I2C and TMP102 sensor support out of the
box, so you could just use that (and avoid the need for a custom kernel for this
hack). For more information about Occidentalis, see Hack #27 .
What is I2C?
I2C (Inter-Integrated Circuit) is a protocol for connecting low-speed devices with
two wires. It is common in embedded systems, especially for sensors. The Rasp-
berry Pi has two dedicated GPIO pins (2 and 3 on the current Raspberry Pi Model
B) preconfigured for I2C.
 
Search WWH ::




Custom Search