All examples below assume LCDproc version 0.5.7.
Configure Raspbian
Install LCDproc
Make and install LCDproc from source
LCDproc configuration file
Using an Adafruit LCD Pi Plate
Using a HD44780 compatible LCD wired as 4-bit parallel
Test
- This LCDproc install sequence assumes you have successfully completed the Raspbian setup (expanded filesystem, set keyboard, time, etc.) using the
raspi-config
utility.
- Optional: It is not necessary to configure Raspbian with an attached keyboard, mouse and monitor. If you connected the Raspberry Pi to a network, Raspbian will accept an ssh connection during its first boot; the default hostname is
raspberrypi
.
- After opening an ssh terminal to your Raspberry Pi, the following command will start the config process:
sudo raspi-config
- Make sure you enable ssh on boot before completing
raspi-config
. Do this from the main menu by selecting Advanced Options and then selecting SSH.
- Required: Apply the latest Raspbian updates:
sudo apt-get update
sudo apt-get upgrade
sudo reboot
- Optional: Here’s an easy way to configure a Wi-Fi connection on your Raspberry Pi over ssh:
sudo apt-get install wicd-curses
wicd-curses
- Required: Complete additional steps if Using an Adafruit LCD Pi Plate display.
- Install LCDproc from the Raspbian repository:
sudo apt-get install lcdproc
- Check the LCDproc version number by querying the LCDd server and examining the first line returned:
LCDd -h
Example:
LCDd - LCDproc Server Daemon, 0.5.7
Copyright © 1998-2014 Selene Scriven, William Ferrell and misc. contributors.
This program is released under the terms of the GNU General Public License.
....
- If the LCDproc version is at least 0.5.7, proceed to LCDproc configuration file.
- Otherwise, you need to remove the version you already downloaded from the repository:
sudo apt-get purge lcdproc
and then continue to “Make and install LCDproc from source.”
- Install the required development files:
sudo apt-get install libusb-dev libncurses-dev libxosd-dev
- Option 1: Download and extract the source from LCDproc at SourceForge.
wget https://sourceforge.net/projects/lcdproc/files/lcdproc/0.5.7/lcdproc-0.5.7.tar.gz
tar xzf lcdproc-0.5.7.tar.gz
cd lcdproc-0.5.7
- Option 2: Use the latest CVS source:
- Install the required packages for CVS:
sudo apt-get install cvs autoconf automake
- Use CVS to download the LCDproc source. Either type the following all on one line without the \, or copy and paste all three lines together:
cvs -z3 \
-d:pserver:anonymous@lcdproc.cvs.sourceforge.net:/cvsroot/lcdproc \
checkout -P lcdproc
- Start the build:
cd lcdproc
sh ./autogen.sh
- Continuing with Option 1 or Option 2:
Either type the following all on one line without the \, or copy and paste the two lines together:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-drivers=curses,hd44780,picolcd,xosd
and then type:
make
- Do a sanity check on
LCDd
before installing it:
sudo invoke-rc.d LCDd stop
server/LCDd -f -c LCDd.conf
You should see a
curses
emulation window inside a terminal window:
If you do, terminate
LCDd
with<CTRL><C>
.
- Edit
LCDd.conf
in the current directory:
change line: DriverPath=server/drivers/
to be : DriverPath=/usr/lib/lcdproc/
- Install the new version. If you did not remove the previous version of LCDproc, it will replace everything except most of the drivers. It will only replace the curses, hd44780, picolcd and xosd drivers.
sudo make install
- If you did not remove the previous version of LCDproc, install the init scripts:
sudo cp scripts/init-LCDd.debian /etc/init.d/LCDd
sudo cp scripts/init-lcdproc.debian /etc/init.d/lcdproc
sudo chmod +x /etc/init.d/LCDd /etc/init.d/lcdproc
- If you will only be using either the Adafruit LCD Pi Plate or a 4-bit parallel hd44780 compatible LCD display, you can safely use the supplied preconfigured files. Otherwise, you will need to manually edit
/etc/LCDd.conf
to match your configuration.
- The preconfigured files differ from the default
LCDd.conf
:
- All drivers were removed except for curses, hd44780, picolcd and xosd.
- ServerScreen is set to off.
- After LCDncid (not LCDproc!) is installed from the deb package or the source package at SourceForge, the preconfigured files are located in /usr/share/doc/lcdncid:
- Adafruit LCD Pi Plate:
sudo cp /usr/share/doc/lcdncid/LCDd-piplate-rpi.conf /etc/LCDd.conf
- 4-bit parallel hd44780:
sudo cp /usr/share/doc/lcdncid/LCDd-4bit-rpi.conf /etc/LCDd.conf
- After
LCDd.conf
is updated or replaced and the old LCDproc package was not removed, restartLCDd
:
sudo invoke-rc.d LCDd restart
- After
LCDd.conf
is updated or replaced and the old LCDproc package was removed, restartLCDd
and enable at boot:
sudo invoke-rc.d LCDd restart
sudo update-rc.d LCDd defaults
- Notes:
LCDd
will only start properly if run as root on RPi.
- LCD backlight will turn on when
LCDd
is running.
- Proceed to Test.
- You can find the Pi Plate product and ordering information at the Adafruit web site.
- Required: Configure the Raspberry Pi to recognize the Adafruit LCD Pi Plate:
- Start
raspi-config
:
sudo raspi-config
- From the main menu select Advanced Options.
- Select I2C.
- When prompted with,
Would you like the ARM I2C interface to be enabled?
, choose YES.
- When prompted with,
Would you like the I2C kernel module to be loaded by default?
it is very important that you choose NO; you’ll be enabling the kernel modules manually below.
- Select FINISH from the main menu. If you are prompted with,
Would you like to reboot now?
, choose NO.
- View the contents of file
/etc/modules
:
cat /etc/modules
- If you do not see
i2c-dev
, add it by typing:
sudo sh -c "echo 'i2c-dev' >> /etc/modules"
- If you do not see
i2c-bcm2708
, add it by typing:
sudo sh -c "echo 'i2c-bcm2708' >> /etc/modules"
- Reboot the Raspberry Pi:
sudo reboot
- Optional: Install i2c-tools and go to Pi Plate Usage to do some checks:
sudo apt-get install python-smbus
sudo apt-get install i2c-tools
- A HD44780 LCD using a prototyping board to wire to a Raspberry Pi B.
- Recommended pin mapping:
Signal LCD_Pin RaspberryPi_Pin
GND 1 P1-06
+5V 2 P1-02
Contrast 3 P1-06 see Notes 1, 3 below
RS 4 P1-26
RW 5 P1-06
E 6 P1-24
Data 4 11 P1-22
Data 5 12 P1-18
Data 6 13 P1-16
Data 7 14 P1-12
BL 15 see Notes 2, 3 below
GND 16 P1-06
Note 1:
Pin mapping as shown will provide maximum contrast.
For adjustable contrast, LCD pin 3 can be connected to the wiper of a 10K pot. The other legs are connected to +5V and GND.
Note 2:
Connect to +5V through a 10-600 ohm resistor for desired brightness.
Note 3:
The LCDproc HD44780 default pin mapping table differs slightly from the recommended pin mapping:
- Contrast (pin 3) is not in the LCDproc default pin mapping table; recommended pin mapping has it connected to GND.
- BL (pin 15) is connected to P1-11 in the LCDproc default pin mapping table; recommended pin mapping has it connected to +5V through a resistor.
- Start
LCDd
in foreground:
sudo LCDd -f
- You should see a display similar to the following on the LCD module:
Terminate
LCDd
with<CTRL><C>
.
- Use
invoke-rc.d
to startLCDd
:
sudo invoke-rc.d LCDd start
- Use
update-rc.d
to enableLCDd
andlcdncid
at boot:
sudo update-rc.d LCDd defaults
sudo update-rc.d lcdncid defaults
- For more information on the above commands, see their man pages:
man LCDd
man invoke-rc.d
man update-rc.d