From charlesreid1

Also see Arduino LCD Display, which was the original.

Overview

See Arduino LCD Display#Overview for an overview of how the LCD display works. It works by communicating with the microcontroller using I2C pins, which provide a way for integrated circuits to communicate with each other.

The Circuit

Breadboard Diagram

Need to make a firtzing diagram for this.

Breadboard Photo

Here's a photo of the breadboard:

File:RaspberryPi LCD Circuit.jpg

Python Sketch

More information about the Raspberry Pi GPIO pinouts and how to control 'em with Python is over on the RaspberryPi/Blink page.

Specifically, here is some Python code written to control GPIO pins on the Raspberry Pi: RaspberryPi/Blink#The_Python_Code

The Code

Adafruit provides a whole long list of examples and Python modules for different device interfaces: https://github.com/adafruit/Adafruit_Python_CharLCD

Prep the Pi

Make sure you can log in to the Pi. This consists of the following steps:

  • Mount the SD card and edit cmdline.txt, hard-code an IP address in cmdline.txt
  • Unmount the SD card and insert it back into the Pi and power it up
  • Give the Pi a minute to finish booting up, then connect it using an Ethernet cable to your desktop/computer
  • Remotely log in to the Pi via SSH

The Python Code

Adafruit code for controlling LCDs from the Raspberry Pi: https://github.com/adafruit/Adafruit_Python_CharLCD

Make sure the RPi-GPIO package is installed:

Download the package on your laptop and copy it over to the Pi:

[laptop] $ wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz
[laptop] $ scp RPi.*.tar.gz pi@169.254.113.200:~/.

Then you install it manually on the Pi:

[pi] $ cd ~
[pi] $ tar xzf RPi*.tar.gz
[pi] $ cd RPi*
[pi] $ sudo python setup.py install

Flags