Skip to content
PeteManchester edited this page Apr 3, 2018 · 6 revisions

This page details the installation and configuration of the LCD Display Plugin.

Some points to note: It is for the Rapsi only because it uses the GPIO. It uses a standard HDD44780 compliant display. It uses the Pi4J

In my case I used a OLED from Maplin OLED 20x2

To install the plugin:
Create directory called 'plugins' (if not already created) in the mediaplayer directory (/home/pi/mediaplayer).
In the plugins directory create a folder called 'LCDDisplay' (can be any name you want).
Copy the LCD.xml and LCDDisplay.jar file into the LCDDisplay folder.
Restart mediaplayer.
MediaPlayer should now detect the new plugin, this can be seen in the log file:

[main] DEBUG [org.rpi.os.OSManager] Attempt to Load Plugin: LCDDisplay.jar file:/home/pi/mediaplayer/plugins/LCDDisplay/LCDDisplay.jar [main] DEBUG [org.rpi.plugin.lcddisplay.LCDDisplayImpl] Init LCDDisplayImpl [main] DEBUG [org.rpi.plugin.lcddisplay.LCDDisplayImpl] Find Class, ClassName: org.rpi.plugin.lcddisplay.LCDDisplayImpl

Once the plugin is detected by mediaplayer you can then edit the LCD.xml file:

<LCD columns="20" pin_rs="11" pin_strobe="10" pin_data_1="0" pin_data_2="1" pin_data_3="2" pin_data_4="3" pin_data_5="0" pin_data_6="0" pin_data_7="0" pin_data_8="0"> 
    <lcdrow><text> Artist:[PERFORMER] Album:[ALBUM] Title:[TITLE] Composer:[COMPOSER] Conductor:[CONDUCTOR] Year:[DATE{yyyy}]</text></lcdrow>  
    <lcdrow><text>Vol:[VOLUME]  Time:[TIME]</text></lcdrow>  
    <lcdrow><text>Line 3</text></lcdrow>  
    <lcdrow><text>Line 1</text></lcdrow>  
    <lcdstandby><text>[SYS_DATE{yyyy.MM.dd  hh:mm:ss}]</text></lcdstandby>  
    <lcdstandby><text>[SYS_MEMORY_USED] [SYS_CPU_TEMP]C [SYS_BOARD_TYPE]</text></lcdstandby>  
</LCD>  

Where:

'columns' is the number of columns supported by your LCD Display.
'pin_rs' is the GPIO Pin of the RS connection to the LCD Display.
'pin_strobe' is the GPIO Pin of the Strobe connection to the LCD Display.
'pin_data_x' is the GPIO Pin of the Data x connection to the LCD Display in the range 1 to 8.
Each 'lcdrow' tag defines a row on your display.

Variables for that can be used from the track metadata are:
FULL_DETAILS
ARTIST TITLE
ALBUM PERFORMER COMPOSER
CONDUCTOR
DATE
STANDBY

System variables that can be displayed are:
SYS_MEMORY_USED
SYS_CPU_TEMP
SYS_MEMORY_FREE
SYS_DATE

After making any changes to the LCD.xml always restart mediaplayer.

When in Standby the 'lcdstandby' tags will be displayed.

Here is the connection diagram for the LCD (I've just discovered Fritzing)

Because I used an OLED display I don't need any connections for the display contrast or +V or Ov for the LED power

The connections were taken from this exmample: https://github.com/Pi4J/pi4j/blob/master/pi4j-example/src/main/java/WiringPiLcdExample.java
http://pi4j.com/pins/model-b-rev2.html

4 bit Data using the default values: LCD Data bit 1 = GPIO 0
LCD Data bit 2 = GPIO 1
LCD Data bit 3 = GPIO 2
LCD Data bit 4 = GPIO 3

LCD RS Pin = GPIO 11
LCD Strobe Pin = GPIO 10

Midas OLED DataSheet

Midas OLED DataSheets