We are moving! New user registrations to this forum is now closed. Posting here will be disabled eventually. Please go to the new community for your Snakeoil OS support and other discussions. (June 03)

New community website: https://community.snakeoil-os.net (June 03)

Join us in the new community by Creating a new account. (June 04)


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


Bookmarks

Messages In This Thread
OLED display for Snakeoil Raspberry Pi and MPD - by Bromf - 19-Oct-2018, 03:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DACs And Motherboards Working With Snakeoil agent_kith 36 6,763,891 12-Mar-2025, 01:15 PM
Last Post: Snoopy8
  Snakeoil virtualized (PROXMOX), USB+PCI AUDIO passthrough, USB-DAC! lzyla 3 1,390 25-Jun-2024, 02:38 PM
Last Post: agent_kith
  I/R remote .Raspberry Pi, Snakeoil,MPD, and LIRC Bromf 4 4,907 19-Oct-2023, 10:06 PM
Last Post: vinaymoturi
  IR Blasting - LMS on snakeoil davem 3 2,666 04-Nov-2020, 12:39 PM
Last Post: davem
  Get Mytec Stereo 192 working in Snakeoil agent_kith 1 5,491 08-Aug-2017, 08:25 PM
Last Post: agent_kith



Users browsing this thread: 1 Guest(s)
[-]
Our Sponsors

[-]
Latest Threads
Android Firefox issues with forum
Last Post: agent_kith
10-Jun-2025 04:45 PM
» Replies: 21
» Views: 2030
[split] Possible To Load Snakeoil OS in ...
Last Post: Snoopy8
09-Jun-2025 06:43 AM
» Replies: 14
» Views: 1498
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
05-Jun-2025 03:58 PM
» Replies: 67
» Views: 8844
Snakeoil with Ubuntu Desktop ?
Last Post: Snoopy8
02-Jun-2025 09:38 AM
» Replies: 8
» Views: 902
Add IR remote control using Flirc USB in...
Last Post: Snoopy8
31-May-2025 03:50 PM
» Replies: 5
» Views: 653
Work In Progress: 1.4.4
Last Post: hkphantomgtr
29-May-2025 11:44 PM
» Replies: 44
» Views: 4976
SQ difference - Raspberry Pi vs x86_64?
Last Post: Snoopy8
27-May-2025 02:16 PM
» Replies: 42
» Views: 5364
Snakeoil 1.4.0 (High End)
Last Post: aabman
25-May-2025 11:35 AM
» Replies: 93
» Views: 14798
new install issues
Last Post: carlodim
23-May-2025 09:56 AM
» Replies: 42
» Views: 4395
Is this project still alive?
Last Post: agent_kith
20-May-2025 03:11 PM
» Replies: 10
» Views: 1168

[-]
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.