User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Nov 06, 2020 5:44 pm

julsboo wrote:
Fri Nov 06, 2020 3:54 pm
I got an answer by email, @peppy.player could you take a look?
You need to disable Peppy player first. Run 'sudo nano /etc/rc.local' and comment out this line in the /etc/rc.local:

Code: Select all

#su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'
Reboot: sudo reboot

Then create the file for example test.py with the following content. Please make sure that you preserve indentation/spaces as Python is very sensitive to that.

Code: Select all

import pygame
pygame.init()
pygame.mouse.set_visible(False)
screen = pygame.display.set_mode((800, 480))
clock = pygame.time.Clock()
while True:
    screen.fill((0, 0, 0))
    for i in range(28):
        pygame.draw.rect(screen, (250, 40, 153), (i * 21, 0, 20, 20))
        pygame.display.flip()
        clock.tick(60)
Then run it from command line:
openvt -s -- python3 test.py

If everything is fine the program should draw rectangles on the black screen. Please let me know if it does that.

Best regards

julsboo
Posts: 8
Joined: Sun Nov 01, 2020 10:49 pm

Re: Peppy player

Sat Nov 07, 2020 11:17 am

Thanks for your help peppy.player, it's much appreciated.

First I didn't get the rectangles.
Then I messed up with Hyperpixel4 install https://github.com/pimoroni/hyperpixel4
and with /boot/config.txt so I can now see the purple rectangles line.

/boot/config.txt

Code: Select all

dtoverlay=hyperpixel4
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x7f216
framebuffer_width=800
framebuffer_height=480
display_rotate=3
hdmi_timings=800 0 50 20 50 480 1 3 2 3 0 0 0 60 0 32000000 6

display_rotate=3
hdmi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Nov 07, 2020 4:51 pm

OK, I think we are very close now. Do you use the console mode? Do you connect to the Pi over SSH (e.g. putty)?
Now try to run the player from the folder /home/pi/Peppy:
openvt -s -- python3 peppy.py
and let me know the result.

Best regards

julsboo
Posts: 8
Joined: Sun Nov 01, 2020 10:49 pm

Re: Peppy player

Sat Nov 07, 2020 6:05 pm

I connect to the Pi over SSH with putty.
When I run Peppy from the folder /home/pi/Peppy with the command you mentionned I still have a black screen.

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Nov 07, 2020 6:55 pm

Do you see any error messages when you start the player?
Please make sure you have the following properties in the /home/pi/Peppy/config.txt:
headless = False
mouse = True
touchscreen = True
hdmi = False

The Pygame initialization logic is in these two functions:
https://github.com/project-owner/Peppy/ ... g.py#L1243
https://github.com/project-owner/Peppy/ ... g.py#L1278
We need to find out which parameter is wrong there.

Best regards

julsboo
Posts: 8
Joined: Sun Nov 01, 2020 10:49 pm

Re: Peppy player

Sun Nov 08, 2020 11:36 pm

Hi peppy.player,

There doesn’t seem to be a /dev/input/touchscreen device, is this normal?
If I look at the devices I get this:

Code: Select all

pi@raspberrypi:~ $ cat /proc/bus/input/devices
I: Bus=0018 Vendor=0416 Product=038f Version=1060
N: Name="Goodix Capacitive TouchScreen"
P: Phys=input/ts
S: Sysfs=/devices/platform/i2c@0/i2c-11/11-005d/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 20000000 0 0 0
B: ABS=2658000 3
and /dev/input

Code: Select all

pi@raspberrypi:/dev/input $ ls -l
total 0
drwxr-xr-x 2 root root      60 nov.   9 00:23 by-path
crw-rw---- 1 root input 13, 64 nov.   9 00:23 event0
crw-rw---- 1 root input 13, 63 nov.   9 00:23 mice
crw-rw---- 1 root input 13, 32 nov.   9 00:23 mouse0

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Mon Nov 09, 2020 1:44 am

Hi Juls,
julsboo wrote:
Sun Nov 08, 2020 11:36 pm
There doesn’t seem to be a /dev/input/touchscreen device, is this normal?
That's probably OK. If player cannot find it it will try to use /dev/input/event0:
https://github.com/project-owner/Peppy/ ... g.py#L1293
This is related to the touch functionality. We need to fix drawing on screen first. Do you see UI or not? If not, do you see any error messages? Whenever drawing on the screen works we can switch to the touch functionality if it doesn't work.

As the testing program works fine we just need to use the same Pygame initialization code as in that testing program. You can also try to add logging messages to the functions init_lcd and get_pygame_screen to see where it fails.

Making different displays working with the player is the most complicated part. Therefore I decided to provide disk images for specific displays. But there are so many different displays that it's almost impossible to create disk images for all of them...

Best regards

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Nov 21, 2020 6:13 pm

Here is the new addition to the Peppy Player Gallery - BoomBox by Zippo (Germany)

This is very interesting project in the original vintage enclosure. The base of the project is the ghetto blaster which is about 25 years old. It was available for a low price as the cassette player didn't work. Zippo preserved the radio functionality and replaced the cassette player by the Raspberry Pi and display. He connected the audio output of the Raspberry Pi to the magnetic reading head through the low-pass RC filter. That allowed to re-use the original amplifier and speakers. The original volume control can be used as well. The mp3 files can be placed on a separate partition of the USB drive which is automatically mounted via the fstab during booting process.

Here are the components used for the project:
  • Raspberry Pi 3B bootable from USB flash drive. The connection to the Ethernet and USB drive is available in the battery compartment
  • Display is a waveshare clone where you have to invert the contrasts
  • Stop, backward, forward and play buttons connected to the Raspberry Pi GPIO connector
  • 5V 3A power supply
https://github.com/project-owner/PeppyP ... po-germany

Image

Image

rasplock
Posts: 1
Joined: Tue Dec 15, 2020 6:12 am

Re: Peppy player

Tue Dec 15, 2020 6:35 am

Hi,

I had trouble finding one of the touchscreens listed here https://github.com/project-owner/PeppyP ... isk-Images


So i bought Joy-it, RB-TFT3.2-V2 because it is readily available in Germany for a reasonable rate. Can I make this touchscreen work with Peppy?

I have set up the headless Peppy Player with manual setup, but I had no luck getting the Touchscreen to work. For now I would like to leave the Headless Peppy Player as it is.

I'm currently ordering parts for making the Peppy Player with touchscreen display, speakrs, display and eveything and trying to figure out what parts I still need to obtain complete everything.

raspilock

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Tue Dec 15, 2020 5:50 pm

Hi,

Please make sure that you start the player using the following command in the ssh session:
openvt -s -- python3 peppy.py

BTW, I found some info about joy-it display installation on German forum:
https://forum-raspberrypi.de/forum/thre ... post418741
It's very helpful forum.

Best regards

diazepamek
Posts: 2
Joined: Tue Dec 22, 2020 10:46 am

Re: Peppy player

Tue Dec 22, 2020 10:53 am

Hi.
I bought LCD: https://www.waveshare.com/wiki/4.3inch_HDMI_LCD_(B).
After I used Peppy Player disk images for Waveshare 5.0" HDMI LCD (yes, I know, I have 4,3")- touchscreen doesn`t work...
It is my third LCD- no one works with Peppy player... Sad but true...
What I`m doing wrong...?
Greetings....

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Tue Dec 22, 2020 6:02 pm

Hi,

I'm sorry to hear about that. Which displays did you try? Could you give the links to the product pages for all of them?
If there is no disk image for your display on this page:
https://github.com/project-owner/PeppyP ... isk-Images
then I would recommend to install the Headless image and then the driver for your display on top of it. Just keep in mind that more likely there are additional steps required to make it working after that.

The touchscreen installation/configuration is the most complicated part in the player setup. There are so many display models on the market which usually need different steps for making it working.

For your reference here are the steps which I follow to prepare the disk image for the Wvaeshare 5.0" HDMI display. Hopefully they will be helpful. You need to use the driver for your display.

Code: Select all

connect LCD

----------------------------- Install Headless image ---------------------------------------------

nano Peppy/config.txt
width = 800
height = 480
hdmi = True
headless = False

nano Peppy/screensaver/peppymeter/config.txt
screen.size = large

------------------------------------ Configure LCD -------------------------------------------------

sudo nano /boot/config.txt
add:
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
disable_splash=1

wget https://www.waveshare.com/w/upload/3/34/LCD-show-180331.tar.gz
tar xzf LCD-show-180331.tar.gz
cd LCD-show/
chmod +x LCD5-show
./LCD5-show
reboots itself

Create the file
sudo nano /etc/udev/rules.d/95-ads7846.rules
with content:
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="ADS7846 Touchscreen", SYMLINK+="input/touchscreen"
sudo apt-get install libts-bin
sudo reboot
 
calibrate:
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate

to disable boot messages:
sudo nano /boot/cmdline.txt 
add fbcon=map:2

add splash screen:
sudo apt-get install fbi
wget https://raw.githubusercontent.com/project-owner/Peppy.doc/master/files/splash.service
nano splash.service
change in splash.service /dev/fb1 to /dev/fb0
change splash.png -> splash-800.png
sudo mv splash.service  /etc/systemd/system
sudo systemctl enable splash
sudo systemctl start splash

add to /etc/rc.local:
sudo nano /etc/rc.local
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'

change .asoundrc from HDMI to Headphone:
type hw card 1
slave.pcm "plughw:1,0"

sudo reboot
login 
test
sudo rm -rf LCD*
rm .bash_history
sudo poweroff

Best regards

diazepamek
Posts: 2
Joined: Tue Dec 22, 2020 10:46 am

Re: Peppy player

Wed Dec 23, 2020 7:47 am

Hi.
Thank You for help. I bought touchscreens:
https://www.waveshare.com/wiki/3.2inch_ ... ng_Started
https://www.waveshare.com/wiki/4inch_RP ... )#Software
and
https://www.waveshare.com/wiki/4.3inch_HDMI_LCD_(B)

I'll try Your resolutions after Ch. Holidays and I'll let You know if it works. Greetings...

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Fri Dec 25, 2020 8:19 pm

Here is the new project in the Gallery - Woodstock Edition by Herbert (Germany):
https://github.com/project-owner/PeppyP ... rt-germany
This time he created the headless version of the Peppy player:

Image

The project consists of the the following hardware components:
- Raspberry Pi Zero W
- USB-Hub
- USB sound card
- USB wireless stick
- USB Flash memory 128GB for music collection
- 2 full range speakers Panasonic 3” 5/10W, 6 Ohm
- PAM8403 Stereo amplifier 2x3W
- Power supply 5V 2A
- 18mm spruce boards, 8mm plywood
- Linseed oil

Image

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sun Dec 27, 2020 12:47 am

New version (Hokusai Edition) of the Peppy Player was just released.
The disk images with new release are available here:
https://github.com/project-owner/PeppyP ... isk-Images

New features and changes:

- Added new meters to the VU Meter screensaver which were added to the PeppyMeter earlier.

Image

- Added the size parameter to the Clock screensaver.
- The Weather screensaver is using the player's backgrounds now.
- Implemented the logic which restores the current player state if configuration file was corrupted.
- Updated radio playlists for all languages and genres - removed dead links and added many new stations.
- Provided new disk image for the Waveshare 7.9" Touchscreen.
- Fixed bugs in Podcasts and Lyrics screensaver.

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Thu Dec 31, 2020 12:52 am

2020 Year Summary
The following image highlights the key features implemented in the Peppy Player this year.

Image

The focus for the next year will be on the player performance and visual appearance. If time will allow the new features will be implemented as well. The planned features include: support for auto-mounting hard/flash drives, Streamer functionality. Another planned feature is the REST API. It should allow to create alternative Player UIs for example 3D Web UI, Command Line Interface (CLI) and so on. And finally there is the idea to add board and card games (Chess, Sudoku etc.)

As usual the player disk images can be found here:
https://github.com/project-owner/PeppyP ... isk-Images

Image

xmac1x
Posts: 4
Joined: Fri Jan 01, 2021 3:39 pm

Re: Peppy player

Fri Jan 01, 2021 6:39 pm

Happy new year all! I've just installed Peppy on my Pi Zero W. I've attempted to use a waveshare32b instead of the 35, substituting the relevant steps on the wiki guide ( ./LCD32-show instead of ./LCD35B-show lite). Everything works, except that the screen only displays correctly if I touch it. The pygame version and community link are permanently on disply. The player background only shows when touched. Any suggestions? I've attached my conf.ini in case it helps

Code: Select all

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
enable_uart=1
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=waveshare32b:rotate=270
#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
hdmi_force_hotplug=1
#max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2

xmac1x
Posts: 4
Joined: Fri Jan 01, 2021 3:39 pm

Re: Peppy player

Fri Jan 01, 2021 11:41 pm

Ok so I figure out what was wrong. The screen res needs to be set correctly to 320x240 in nano Peppy/config.txt before
the calibration! So the 3.2 inch wavehshare 32b now works correctly once the driver was reinstalled, also this time using "./LCD32-show lite"
Hope this helps someone else in future!

Cheers for the really great media player Peppy!

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Jan 02, 2021 5:48 pm

Thank you!
Good to know that you were able to make it working.
Also don't forget to change the resolution of the VU Meter screensaver in the file:
/home/pi/Peppy/screensaver/peppymeter/config.txt
This is described here for another display with resolution 320x240 but the steps are the same:
https://github.com/project-owner/PeppyP ... or-display

Best regards

User avatar
peppy.player
Posts: 325
Joined: Mon Mar 07, 2016 6:10 am

Re: Peppy player

Sat Jan 16, 2021 4:30 am

Hi,

I have fixed the bug related to the file sorting. Please follow the steps described here to get the fix:
https://github.com/project-owner/PeppyP ... own-Issues

Best regards

Return to “Media centres”