I have found the solution. The problem was that LCDproc was not up and running. There were 3 reasons for this:
- The HD44780 driver needs to be updated to support an RPi2
- The settings in the LCDd.conf need to be correct.
3.I had the mapping of LCD connections incorrect.
I used the instructions in the AndyPi website http://andypi.co.uk/?p=334, but there are a couple of snags to fix to make it work:
- Make sure the fixed driver is installed in the correct directory. Actually the directory is pointed at by the config file. I am consistent with the original build directory. The working file for an RPi 2 can be found here http://ehc.ac/p/lcdproc/patches/21/#b8f3. Paul Webster has kindly posted a link to the hd44780.so file on the site. You can grab it using this command:
wget -O /usr/lib/ arm-linux-gnueabihf/lcdproc/hd44780.so http://ehc.ac/p/lcdproc/patches/_discuss/thread/4c659fe3/b8f3/attachment/hd44780.so
Next there is a bug in the AndyPi LCDd.conf file. Here is the file in full. Use an editor to set it up like the file pasted in below. This must go into /etc/LCDd.conf. Best to reboot the RPi after changing it.
I have read numerous posts that have different mappings of LCD pins to GPIO pins. With various changes in HW over the years. All that matters is that the LCDd.conf correctly captures how your LCD is connected to the RPi GPIO pins. The defaults are shown in my file below
All the other points on the AndyPi website are OK and getting the mpdlcd to run is as it says.
[code]## LCDd.conf - base configuration file for LCD display server
Setup for use with an HD44780 16x2 display on an Raspberry Pi 2
For use with Volumio v1.55
v1.0 Baloothebear4 4/6/15
#… Note this is where the HD44780 driver needs to go ==>
Hitachi HD44780 driver
Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC
Select what type of connection. See documentation for types.
If you have a keypad connected.
You may also need to configure the keypad layout further on in this file.
If you have a switchable backlight.
If you have the additional output port (“bargraph”) and you want to
be able to control it with the lcdproc OUTPUT command
Specifies if the last line is pixel addressable or it controls an
underline effect. [default: true (= pixel addressable); legal: yes, no]
Specifies the size of the LCD.
In case of multiple combined displays, this should be the total size.
For multiple combined displays: how many lines does each display have.
Vspan=2,2 means both displays have 2 lines.
If you have a KS0073 or an other ‘almost HD44780-compatible’, set this
flag to get into extended mode (4-line linear).
This flag is NOT the old obsolete Extended option.
If your display is slow and cannot keep up with the flow of data from
LCDd, garbage can appear on the LCDd. Set this delay factor to 2 or 4
to increase the delays. Default: 1.
You can reduce the inserted delays by setting this to false.
On fast PCs it is possible your LCD does not respond correctly.
If the display is connected to non-default GPIO pins, the driver can
recognise these with pin assignment commands.
commented out as these are the defaults