
Usage
The backlights will not turn on until you have the code running so don't be alarmed if nothing
lights up when you plug in the plate! If you have a 'positive' style LCD, you may see some
squares on the first line, that's normal
Setting up your Pi for I2C
For a more basic introduction to setting up I2C on your Pi then you may wish to take a
diversion to this Adafruit tutorial:
http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-
gpio-setup/configuring-i2c
(http://adafru.it/aTI)
If you're using Occidentalis, you can skip this next step, but for Raspbian users, edit
/etc/modules (sudo nano /etc/modules) and add:
i2c-bcm2708
i2c-dev
to the end of the file. Then save and reboot to enable the hardware I2C driver.
Before you can get started with I2C on the Pi, you'll need to run through a couple quick steps
from the console. Just enter the following commands to add SMBus support (which includes
I2C) to Python:
i2c-tools isn't strictly required, but it's a useful package since you can use it to scan for any
I2C or SMBus devices connected to your board. If you know something is connected, but
you don't know it's 7-bit I2C address, this library has a great little tool to help you find it:
sudo apt-
get
install python-smbus
sudo apt-
get
install i2c-tools
sudo i2cdetect -y
0
(
if
you are
using
a version
1
Raspberry
Pi
)
sudo i2cdetect -y
1
(
if
you are
using
a version
2
Raspberry
Pi
)
© Adafruit Industries
https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-
raspberry-pi
Page 28 of 32