19-Oct-2018, 03:34 PM
This is a recipe for MPD.... (if you use LMS then you will have to research the LMS forums ???...)
(I am assuming you have a usage knowledge of the Linux editor 'nano')
We are using a simple OLED SH1106 I2C 128x64 screen such as this...
https://www.ebay.com/itm/1-3-White-OLED-...SwVGFZqEDx
vcc=3.3v Gnd, SDA and SCL as per your Raspberry Pi's GPIO
Install Snakeoil to your Raspberry pi and bring up the web app..
https://www.snakeoil-os.net/forums/Threa...nd-Testing
https://www.snakeoil-os.net/Manual/confi...-interface
Change password in web app>'System' page.
Log into Snakeoil via ssh. = pi@<ip_Address> password = <whatever_you_used_above>
Then run...
and action these options...
#5=Interface options>P5 I2C and activate i2c
then...
#7=Advance options>A1 Expand filesystem
Finish...and reboot.
ssh in again and install Adrians Oled...(sourced from here...https://github.com/antiprism/mpd_oled)
and...
add at the bottom the following...
then..
and check that i2c-dev is listed and uncommented (should be default)
Now...
ssh in and...
select for your location.
Important..(use next whichever version of mpd you are using as your player...I am using mpd-v20.)
add the following lines to the end of the file... (this is for the oled data and will not affect your selected audio output details)
Force Snakeoil to regenerate mpd.conf and restart MPD by going to the Web UI = MUSIC PLAYER and clicking the 'Save and restart players' button.
mpd_oled install.....
Check the program works correctly by running it while playing music.
( The OLED type MUST be specified with -o from the following list: 1 - Adafruit SPI 128x64, 3 - Adafruit I2C 128x64, 4 - Seeed I2C 128x64, 6 - SH1106 I2C 128x64.)
(test for SH1106 I2C 128x64)
My preferred for SH1106 I2C 128x64(changes scroll rate and 12 Hr clock)
either of the above should activate the oled.
Stop the display with..Ctrl+c
(you can edit the configuration here otherwise accept the defaults...)
then if all works finish by doing...
reboot.
(I am assuming you have a usage knowledge of the Linux editor 'nano')
We are using a simple OLED SH1106 I2C 128x64 screen such as this...
https://www.ebay.com/itm/1-3-White-OLED-...SwVGFZqEDx
vcc=3.3v Gnd, SDA and SCL as per your Raspberry Pi's GPIO
Install Snakeoil to your Raspberry pi and bring up the web app..
https://www.snakeoil-os.net/forums/Threa...nd-Testing
https://www.snakeoil-os.net/Manual/confi...-interface
Change password in web app>'System' page.
Log into Snakeoil via ssh. = pi@<ip_Address> password = <whatever_you_used_above>
Then run...
Code:
sudo raspi-config
and action these options...
#5=Interface options>P5 I2C and activate i2c
then...
#7=Advance options>A1 Expand filesystem
Finish...and reboot.
ssh in again and install Adrians Oled...(sourced from here...https://github.com/antiprism/mpd_oled)
Code:
sudo apt-get update
sudo apt-get install git-core autoconf make libtool libfftw3-dev libasound2-dev
git clone https://github.com/karlstav/cava
cd cava
./autogen.sh
./configure
make
sudo make install
and...
Code:
cd ~
sudo nano /boot/config.txt
Code:
dtparam=i2c_arm_baudrate=400000
Code:
sudo nano /etc/modules
Now...
Code:
sudo apt-get install python-smbus
sudo reboot
Code:
sudo dpkg-reconfigure tzdata
Important..(use next whichever version of mpd you are using as your player...I am using mpd-v20.)
Code:
sudo nano /var/www/players/mpd-v20/mpd.conf.template
Code:
audio_output {
type "fifo"
name "mpd_oled_FIFO"
path "/tmp/mpd_oled_fifo"
format "44100:16:2"
#buffer_time "500000"
}
mpd_oled install.....
Code:
sudo apt install build-essential git-core autoconf make libtool libi2c-dev i2c-tools lm-sensors libcurl4-openssl-dev libmpdclient-dev libjsoncpp-dev
Code:
git clone https://github.com/antiprism/mpd_oled
cd mpd_oled
PLAYER=MPD make
( The OLED type MUST be specified with -o from the following list: 1 - Adafruit SPI 128x64, 3 - Adafruit I2C 128x64, 4 - Seeed I2C 128x64, 6 - SH1106 I2C 128x64.)
(test for SH1106 I2C 128x64)
Code:
sudo ./mpd_oled -o 6 -b 10 -g 1 -f 20
My preferred for SH1106 I2C 128x64(changes scroll rate and 12 Hr clock)
Code:
sudo ./mpd_oled -o 6 -a 3c -r 24 -s 20.0,2.0,3.0,2.0 -C 3
Stop the display with..Ctrl+c
(you can edit the configuration here otherwise accept the defaults...)
Code:
cd mpd_oled
sudo nano mpd_oled.service
then if all works finish by doing...
Code:
sudo bash install.sh
cd ~