OLED display for Snakeoil Raspberry Pi and MPD
#1
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...
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
add at the  bottom the following...
Code:
dtparam=i2c_arm_baudrate=400000
then..
Code:
sudo nano /etc/modules
and check that i2c-dev is listed and uncommented (should be default) 

Now...
Code:
sudo apt-get install python-smbus
sudo reboot
ssh in and...
Code:
sudo dpkg-reconfigure tzdata
select for your location.

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
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)
Code:
audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
        #buffer_time     "500000"
}
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.....
 
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
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)
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
either of the above should activate the oled.
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 ~
reboot.


Attached Files Thumbnail(s)
           
[-] The following 2 users Like Bromf's post:
  • hkphantomgtr, agent_kith
Reply

#2
After a Firmware update the spectrum analyser portion of the display no longer works as the mpd.conf.template is overwritten.
Fix it by rerunning the Fifo patch from the install as follows.....
ssh to your Pi and...

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

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)
Code:
audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
        #buffer_time     "500000"
}

Reboot...
[-] The following 2 users Like Bromf's post:
  • hkphantomgtr, agent_kith
Reply

#3
Hi Bromf,

To make this easier, I'm going to add a new option in MPD configuration (from 1.1.4 onwards).

Simply add the word to the options box, and this audio output device will be added on restart:
Code:
mpd_oled

In the future I'll also package the binaries as a installable module to make it even easier, but will have to leave that till later.
Snakeoil Operating System - Music, your way!
[-] The following 1 user Likes agent_kith's post:
  • Bromf
Reply

#4
(12-Apr-2019, 08:29 AM)agent_kith Wrote: Hi Bromf,

To make this easier, I'm going to add a new option in MPD configuration (from 1.1.4 onwards).

Simply add the word to the options box, and this audio output device will be added on restart:
 
Code:
mpd_oled

In the future I'll also package the binaries as a installable module to make it even easier, but will have to leave that till later.

can we use 20x4 LCD screen with above code

display model is  
hd44780_i2c
Reply

#5
sudo apt install git

then clone the pydPiper repository as usual:

cd /home/pi
git clone https://github.com/dhrone/pydPiper
cd pydPiper

Then for the docker I used the following:

sudo curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Then configure PydPiper

sudo python configure.py

Edit your pages file

Test the install:


sudo /usr/bin/docker run --network=host --privileged -ti -v /var/log:/var/log:rw -v /home/pi/pydPiper:/app:rw dhrone/pydpiper:v0.31-alpha /bin/bash
python pydPiper.py

To finish set it to start automatically

sudo cp pydpiper.service /etc/systemd/system
sudo systemctl enable pydpiper
sudo systemctl start pydpiper



Followed this guide (actually for Moodeaudio) managed to get display. But, unable to start the service automatically after reboot.
Reply

#6
sudo sh get-docker.sh

at this stage it saying to install docker in rootless mode

how to do it?
Reply

#7
(18-Oct-2023, 07:21 PM)vinaymoturi Wrote: sudo sh get-docker.sh

at this stage it saying to install docker in rootless mode

how to do it?

Plz help
Reply

#8
(07-Nov-2023, 02:13 PM)vinaymoturi Wrote: Plz help
Follow this page? Link
Snakeoil Operating System - Music, your way!
Reply

#9
(12-Apr-2019, 08:29 AM)agent_kith Wrote: is this implemented(mpd_oled in options box). i tried but it didnt worked.


Hi Bromf,

To make this easier, I'm going to add a new option in MPD configuration (from 1.1.4 onwards).

Simply add the word to the options box, and this audio output device will be added on restart:
 
Code:
mpd_oled

In the future I'll also package the binaries as a installable module to make it even easier, but will have to leave that till later.
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  Snakeoil virtualized (PROXMOX), USB+PCI AUDIO passthrough, USB-DAC! lzyla 3 429 25-Jun-2024, 02:38 PM
Last Post: agent_kith
  I/R remote .Raspberry Pi, Snakeoil,MPD, and LIRC Bromf 4 4,025 19-Oct-2023, 10:06 PM
Last Post: vinaymoturi
  DACs And Motherboards Working With Snakeoil agent_kith 34 6,737,503 02-Jan-2022, 04:27 PM
Last Post: Bromf
  IR Blasting - LMS on snakeoil davem 3 1,896 04-Nov-2020, 12:39 PM
Last Post: davem
  Get Mytec Stereo 192 working in Snakeoil agent_kith 1 4,802 08-Aug-2017, 08:25 PM
Last Post: agent_kith



Users browsing this thread:
2 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 5790
Dropping Measurements, Hello High-End.
Last Post: agent_kith
26-Oct-2024 09:02 AM
» Replies: 12
» Views: 434
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1668
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 100
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 101
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 328
A network protocol designed for CAS
Last Post: hkphantomgtr
10-Oct-2024 09:48 PM
» Replies: 0
» Views: 83
CAS with "Single Core"
Last Post: hkphantomgtr
06-Oct-2024 08:32 AM
» Replies: 2
» Views: 114
MPD player not working
Last Post: Snoopy8
27-Sep-2024 11:54 AM
» Replies: 7
» Views: 209
LMS playing DFF files sampling rate
Last Post: Snoopy8
16-Sep-2024 07:45 PM
» Replies: 5
» Views: 146

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.