Hardware Reference
In-Depth Information
The TS2561 is a 3.3 V-powered device, so be sure you do not accidentally connect it
to the 5 V power pin on the Raspberry Pi GPIO, or it will go off to electronics heaven.
The Pi Cobbler makes this wiring notably simpler (see Hack #15 ), but as long as you
have wires connecting the TSL2561 breakout to the right pins on the Raspberry Pi
GPIO, you will be fine.
As usual, the instructions in this hack refer to the BCM GPIO pin labels here (see
Hack #14 for details).
Once the TSL2561 breakout board is wired up to the Raspberry Pi, you can use the
I2C utilities within the Linux distribution environment to confirm it is properly con-
nected to the I2C bus on the GPIO, assuming your kernel has I2C support properly
configured. If you have built a custom kernel as described in Hack #22 , you will have
I2C preconfigured properly. If not, you might need to load the following modules before
you can access I2C devices:
$ su -c 'modprobe i2c-bcm2708'
$ su -c 'modprobe i2c-dev'
Further, you will need to enable these additional options:
Industrial IO Support ( CONFIG_IIO )
This option can also be found in the Device Drivers menu. The industrial I/O sub-
system provides a unified framework for drivers for many different types of em-
bedded sensors using a variety of different physical interfaces. You can also go
into that menu and build support for any of the devices that you find within it that
you might want to use in projects. Be sure that you compile in the top-level IIO
support, as shown in Figure 4-8 (you can modularize the sensors below it if you
wish). You will also want to be sure to enable (and compile in) the “Enable buffer
support within IIO” ( CONFIG_IIO_BUFFER ), “Industrial I/O buffering based on kfifo”
( CONFIG_IIO_KFIFO_BUF ), and “Enable triggered sampling support” ( CON
FIG_IIO_TRIGGER ) options inside the Industrial IO Support menu.
 
Search WWH ::




Custom Search