The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide LCD/OLED display using pydPiper
#1
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
Code:
cd /home/pi
git clone https://github.com/dhrone/pydPiper
cd pydPiper
sudo ./install_docker.sh
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:
Code:
sudo raspi-config
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. 
Code:
sudo python configure.py
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.
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
"control-c" to end the test, "exit" to go back to the command prompt.

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
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:
Code:
cd pydPiper
sudo nano pages_weh_80x16.py (or any other page file corresponding to your display)
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.
Code:
sudo nano /boot/config.txt
Add the following line
Code:
dtparam=i2c_arm_baudrate=400000
ctrl-x, yes, enter when finished, and restart

Remy
Reply


Messages In This Thread
LCD/OLED display using pydPiper - by remy1961 - 09-06-2018, 07:17 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-06-2018, 07:32 PM
RE: LCD/OLED display using pydPiper - by spiza - 12-19-2018, 11:22 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-07-2018, 03:04 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 09-10-2018, 08:12 AM
RE: LCD/OLED display using pydPiper - by spiza - 12-19-2018, 11:23 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-10-2018, 08:52 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-11-2018, 12:57 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 02:16 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-11-2018, 02:49 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 02:58 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 09-11-2018, 07:41 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 08:37 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-07-2018, 04:07 AM
RE: LCD/OLED display using pydPiper - by superpat - 11-09-2018, 10:25 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-09-2018, 11:25 AM
RE: LCD/OLED display using pydPiper - by superpat - 11-09-2018, 11:59 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-09-2018, 12:04 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-10-2018, 02:11 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-10-2018, 07:02 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-10-2018, 09:25 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-13-2018, 09:09 AM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-13-2018, 06:56 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-19-2018, 03:32 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-17-2018, 11:57 AM
RE: LCD/OLED display using pydPiper - by muchacho - 11-27-2018, 08:07 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-28-2018, 04:51 AM
RE: LCD/OLED display using pydPiper - by maTzGP - 11-30-2018, 11:14 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 05:56 PM
RE: LCD/OLED display using pydPiper - by muchacho - 12-17-2018, 06:10 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 12-01-2018, 01:31 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 05:42 PM
RE: LCD/OLED display using pydPiper - by rh2018 - 12-01-2018, 09:31 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-01-2018, 07:20 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 10:34 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-05-2018, 08:20 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-06-2018, 06:43 AM
RE: LCD/OLED display using pydPiper - by gropas - 06-07-2021, 06:27 PM
RE: LCD/OLED display using pydPiper - by dwhacks - 12-08-2018, 03:49 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-08-2018, 08:36 PM
RE: LCD/OLED display using pydPiper - by flega - 12-12-2018, 10:09 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-13-2018, 04:34 PM
RE: LCD/OLED display using pydPiper - by flega - 12-12-2018, 11:21 PM
RE: LCD/OLED display using pydPiper - by flega - 12-13-2018, 06:19 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-15-2018, 09:06 PM
RE: LCD/OLED display using pydPiper - by nassost - 12-15-2018, 12:05 PM
RE: LCD/OLED display using pydPiper - by Cardone - 12-15-2018, 01:54 PM
RE: LCD/OLED display using pydPiper - by flega - 12-16-2018, 04:19 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-16-2018, 09:14 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-20-2018, 04:32 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 12-26-2018, 03:42 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-26-2018, 06:40 PM
RE: LCD/OLED display using pydPiper - by nassost - 12-26-2018, 01:09 PM
RE: LCD/OLED display using pydPiper - by flega - 02-12-2019, 06:55 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 02-12-2019, 09:40 PM
RE: LCD/OLED display using pydPiper - by flega - 02-16-2019, 07:35 PM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-06-2019, 06:01 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 03-06-2019, 07:30 AM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-06-2019, 11:51 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 03-06-2019, 08:48 PM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-07-2019, 05:53 AM
RE: LCD/OLED display using pydPiper - by cyoops - 03-27-2019, 04:05 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 04-13-2019, 04:17 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 04-14-2019, 04:26 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 05-08-2019, 07:52 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 05-17-2019, 03:16 PM
RE: LCD/OLED display using pydPiper - by Jempie - 05-21-2019, 05:21 PM
RE: LCD/OLED display using pydPiper - by brunal - 05-21-2019, 09:55 PM
RE: LCD/OLED display using pydPiper - by brunal - 05-24-2019, 09:48 AM
RE: LCD/OLED display using pydPiper - by Jempie - 05-30-2019, 06:10 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 05-31-2019, 02:08 AM
RE: LCD/OLED display using pydPiper - by bertron - 08-27-2019, 09:27 AM
RE: LCD/OLED display using pydPiper - by bertron - 08-30-2019, 07:02 PM
RE: LCD/OLED display using pydPiper - by mezcal - 08-30-2019, 10:57 PM
RE: LCD/OLED display using pydPiper - by bertron - 08-31-2019, 08:13 AM
RE: LCD/OLED display using pydPiper - by mezcal - 09-05-2019, 01:30 PM
RE: LCD/OLED display using pydPiper - by ghera78 - 02-27-2020, 06:51 AM
RE: LCD/OLED display using pydPiper - by muchacho - 05-18-2020, 02:41 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 06-08-2020, 09:47 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 06-08-2020, 08:35 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 06-09-2020, 01:05 PM
RE: LCD/OLED display using pydPiper - by Steve B - 09-15-2020, 04:19 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 10-05-2020, 11:12 PM
RE: LCD/OLED display using pydPiper - by Steve B - 10-06-2020, 09:31 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 10-06-2020, 02:13 PM
RE: LCD/OLED display using pydPiper - by fklco - 01-04-2021, 11:24 AM
RE: LCD/OLED display using pydPiper - by bigbulb - 01-31-2021, 12:54 PM
RE: LCD/OLED display using pydPiper - by bigbulb - 02-01-2021, 02:04 AM
RE: LCD/OLED display using pydPiper - by leobo - 03-21-2021, 07:41 PM
RE: LCD/OLED display using pydPiper - by KmPan - 03-28-2021, 04:56 AM
RE: LCD/OLED display using pydPiper - by Jempie - 06-29-2021, 01:01 PM
RE: LCD/OLED display using pydPiper - by Jempie - 06-30-2021, 06:45 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 06-30-2021, 08:13 AM
RE: LCD/OLED display using pydPiper - by Jempie - 06-30-2021, 10:40 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 06-30-2021, 12:29 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-03-2021, 06:27 AM
RE: LCD/OLED display using pydPiper - by Jempie - 07-04-2021, 09:53 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-04-2021, 05:32 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 09:52 AM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 09:54 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-06-2021, 03:47 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 04:08 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-06-2021, 06:08 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-11-2021, 07:57 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-11-2021, 10:07 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-20-2021, 09:22 AM
RE: LCD/OLED display using pydPiper - by Jempie - 08-07-2021, 09:49 AM
RE: LCD/OLED display using pydPiper - by Jempie - 09-17-2021, 07:54 AM
RE: LCD/OLED display using pydPiper - by Jempie - 09-18-2021, 08:04 AM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-22-2021, 10:14 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-22-2021, 10:41 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 02:43 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 02:57 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-23-2021, 07:26 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 09:27 PM
RE: LCD/OLED display using pydPiper - by Battum - 11-03-2021, 10:50 AM
RE: LCD/OLED display using pydPiper - by Battum - 11-04-2021, 11:12 AM
RE: LCD/OLED display using pydPiper - by uli_s - 11-06-2021, 07:55 PM
RE: LCD/OLED display using pydPiper - by Pranjal - 04-27-2022, 07:05 AM
RE: LCD/OLED display using pydPiper - by Pranjal - 05-24-2022, 04:04 AM
RE: LCD/OLED display using pydPiper - by leobo - 01-10-2022, 10:37 AM
LCD/OLED display using pydPiper - by winnor - 01-19-2022, 09:04 PM
RE: LCD/OLED display using pydPiper - by leobo - 01-26-2022, 05:48 AM
RE: LCD/OLED display using pydPiper - by lhkp0480 - 02-15-2022, 05:00 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-15-2023, 12:05 PM
RE: LCD/OLED display using pydPiper - by KmPan - 01-22-2023, 08:19 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 08:19 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 08:26 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 06:18 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-13-2024, 10:16 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-14-2024, 02:20 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-14-2024, 04:44 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-21-2024, 08:07 AM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-26-2024, 07:13 PM
RE: LCD/OLED display using pydPiper - by ECELO - 05-27-2024, 06:14 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-27-2024, 06:59 PM
RE: LCD/OLED display using pydPiper - by vgnmnky - 06-25-2024, 07:02 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 07:10 PM
RE: LCD/OLED display using pydPiper - by vgnmnky - 06-27-2024, 08:13 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 08:22 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 08:51 PM

Forum Jump: