On the official pydPiper page there is a list of displays that can be controlled using pydPiper. I personnally have experimented with the following:
16x2 oled using parallel interface
20x4 LCD using i2c interface
128x64 oled using i2c interface
The good thing with pydPiper is that it gives you complete control over the information to display and how to display it (font type and size, position on the screen, scroll direction and speed), and it can even display an image (yes, even on a 16x2 oled!).
Here is the tutorial.
Create your moode installation and add the ssh file.
ssh to moode. Password is moodeaudio
1. Install the docker
Be patient. It takes several minutes. Make sure there is a message at the end saying the docker is installed. Otherwise it will not work.
2. Activate i2c interface:
Using the arrow keys, select "Interfacing options", "i2c", Yes, Ok, finish
3. Configuration. You will have to answer a few questions depending on the display you use.
For the 16x2 oled display with parallel interface. Note that this is not actually a code. You answer manually line per line (copy and paste). I presented it as a code so it is easy to distinguish from the other text.
For the 20x4 lcd with i2c interface (system and source are the same as above)
For the 16x2 lcd with i2c interface (system and source are the same as above)
For the 128x64 pixels oled using i2c interface and ssd1306 driver:
4. To test if it works
"control-c" to end the test, "exit" to go back to the command prompt.
5. To complete the installation:
That's all. To customise the display you have to edit the page file used in your configuration. It is found in the directory /home/pi/pydPiper
Take note that:
For the i2c interface, use this command to detect your i2c adress:
You will have numbers only like 27 or numbers with letters like 3c, your i2c adress is 0x27 and 0x3c.
If the display works but complains that there is no widget available, you have to edit your page file in order to get data from MPD:
In the sequence section, replace every "stream" by "encoding", so that you have db['encoding'] instead of db['stream'].
ctrl-x, yes, enter when finished.
i2c interface is known to be slow. To improve the performance for a good refresh rate, you have to edit the configuration.
Add the following line
ctrl-x, yes, enter when finished, and restart
Remy
16x2 oled using parallel interface
20x4 LCD using i2c interface
128x64 oled using i2c interface
The good thing with pydPiper is that it gives you complete control over the information to display and how to display it (font type and size, position on the screen, scroll direction and speed), and it can even display an image (yes, even on a 16x2 oled!).
Here is the tutorial.
Create your moode installation and add the ssh file.
ssh to moode. Password is moodeaudio
1. Install the docker
Code:
cd /home/pi
git clone https://github.com/dhrone/pydPiper
cd pydPiper
sudo ./install_docker.sh
2. Activate i2c interface:
Code:
sudo raspi-config
3. Configuration. You will have to answer a few questions depending on the display you use.
Code:
sudo python configure.py
Code:
[STARTUP]
startup_msg_duration = 5
[DISPLAY]
display_driver = winstar_weg
display_pin_rs = 7
display_pin_e = 8
display_pin_d4 = 25
display_pin_d5 = 24
display_pin_d6 = 23
display_pin_d7 = 27
display_width = 80
display_height = 16
display_enable_duration = 0.1
pagefile = pages_weh_80x16.py
animation_smoothing = 0.15
[SYSTEM]
logfile = /var/log/pydPiper.log
loglevel = info
timezone = US/Eastern (change this according to your location)
time24hour = true
temperature = celsius
[SOURCE]
source_type = moode
mpd_server = localhost
mpd_port = 6600
mpd_password = moodeaudio
For the 20x4 lcd with i2c interface (system and source are the same as above)
Code:
[DISPLAY]
display_driver = hd44780_i2c
display_width = 100
display_height = 32
display_enable_duration = 1
display_i2c_port = 1
display_i2c_address = 0x27
pagefile = pages_lcd_20x4.py
animation_smoothing = 0.15
For the 16x2 lcd with i2c interface (system and source are the same as above)
Code:
[DISPLAY]
display_driver = hd44780_i2c
display_width = 80
display_height = 16
display_enable_duration = 1
display_i2c_port = 1
display_i2c_address = 0x27
pagefile = pages_lcd_16x2.py
animation_smoothing = 0.15
For the 128x64 pixels oled using i2c interface and ssd1306 driver:
Code:
[DISPLAY]
display_driver = luma_i2c
display_i2c_port = 1
display_i2c_address = 0x3C
display_devicetype = ssd1306
display_width = 128
display_height = 64
pagefile = pages_ssd1306.py
animation_smoothing = 0.15
4. To test if it works
Code:
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
5. To complete the installation:
Code:
cd pydPiper
sudo cp pydpiper.service /etc/systemd/system
sudo systemctl enable pydpiper
sudo systemctl start pydpiper
That's all. To customise the display you have to edit the page file used in your configuration. It is found in the directory /home/pi/pydPiper
Take note that:
For the i2c interface, use this command to detect your i2c adress:
Code:
sudo i2cdetect -y 1
If the display works but complains that there is no widget available, you have to edit your page file in order to get data from MPD:
Code:
cd pydPiper
sudo nano pages_weh_80x16.py (or any other page file corresponding to your display)
ctrl-x, yes, enter when finished.
i2c interface is known to be slow. To improve the performance for a good refresh rate, you have to edit the configuration.
Code:
sudo nano /boot/config.txt
Code:
dtparam=i2c_arm_baudrate=400000
Remy