Thank you for your donation!


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


PeppyMeter and moOde
I checked your code and the result as below. The "mouse.device = /dev/input/event0" are correctly

pi@moode:~ $ cat /home/pi/PeppyMeter/config.txt
[current]
meter = random
random.meter.interval = 20
meter.size = wide
screen.width = 1920
screen.height = 480
exit.on.touch = False
output.display = True
output.serial = False
output.i2c = False
output.pwm = False
output.http = False
use.logging = False
use.cache = True
frame.rate = 30

[sdl.env]
framebuffer.device = /dev/fb0
mouse.device = /dev/input/event0
mouse.driver = TSLIB
mouse.enabled = True
video.driver = dummy
video.display = :0
double.buffer = False
no.frame = False

[serial.interface]
device.name = /dev/serial0
baud.rate = 9600
include.time = False
update.period = 0.1

[i2c.interface]
port = 1
left.channel.address = 0x21
right.channel.address = 0x20
output.size = 10
update.period = 0.1

[pwm.interface]
frequency = 500
gpio.pin.left = 24
gpio.pin.right = 25
update.period = 0.1

[http.interface]
target.url = http://localhost:8000/vumeter
update.period = 0.033

[web.server]
http.port = 8001

[data.source]
type = pipe
polling.interval = 0.033
pipe.name = /var/tmp/peppyfifo
volume.constant = 80.0
volume.min = 0.0
volume.max = 100.0
volume.max.in.pipe = 100.0
step = 6
mono.algorithm = average
stereo.algorithm = new
smooth.buffer.size = 4
pi@moode:~ $ ls -lia /dev/input/*
7843 crw-rw---- 1 root input 13, 63 Jul 25 19:33 /dev/input/mice
Reply
(07-26-2022, 01:10 PM)lhkp0480 Wrote: I checked your code and the result as below. The "mouse.device = /dev/input/event0" are correctly

pi@moode:~ $ cat /home/pi/PeppyMeter/config.txt
[current]
meter = random
random.meter.interval = 20
meter.size = wide
screen.width = 1920
screen.height = 480
exit.on.touch = False
output.display = True
output.serial = False
output.i2c = False
output.pwm = False
output.http = False
use.logging = False
use.cache = True
frame.rate = 30

[sdl.env]
framebuffer.device = /dev/fb0
mouse.device = /dev/input/event0
mouse.driver = TSLIB
mouse.enabled = True
video.driver = dummy
video.display = :0
double.buffer = False
no.frame = False

[serial.interface]
device.name = /dev/serial0
baud.rate = 9600
include.time = False
update.period = 0.1

[i2c.interface]
port = 1
left.channel.address = 0x21
right.channel.address = 0x20
output.size = 10
update.period = 0.1

[pwm.interface]
frequency = 500
gpio.pin.left = 24
gpio.pin.right = 25
update.period = 0.1

[http.interface]
target.url = http://localhost:8000/vumeter
update.period = 0.033

[web.server]
http.port = 8001

[data.source]
type = pipe
polling.interval = 0.033
pipe.name = /var/tmp/peppyfifo
volume.constant = 80.0
volume.min = 0.0
volume.max = 100.0
volume.max.in.pipe = 100.0
step = 6
mono.algorithm = average
stereo.algorithm = new
smooth.buffer.size = 4
pi@moode:~ $ ls -lia /dev/input/*
7843 crw-rw---- 1 root input 13, 63 Jul 25 19:33 /dev/input/mice
Hello,
It seems that you are not using the original 7" touch screen; let's try with  /dev/input/mice.
Best regards,
Francesco
Reply
Hello lhkp0480,
have you tryed to use:
"mouse.device = /dev/input/mice"
???
Best regards,
Francesco
Reply
Hi Francesco,
I tried but nothing change then re-flash few time but at this step can't fine exactly your mention code

"""""""""^-1994 to go to row 1994 and modify the current content from:

Code:
"name \"ALSA default\"\n" . "device \"hw:" . $device . ",0\"\n", """""""""""""""""

I've done "sudo apt update" and expense SD card before stating.

The similar code in my playerlib.php file is: "name \"" . ALSA_DEFAULT . "\"\n";
May I continue modify this text to next step?
Reply
Hi lhkp0480,
my suggestion is to follow the instruction in THIS GITHUB, using the option moOde 7.2.0 (only).
If, at the end, you still receive the error message:

Code:
"Traceback (most recent call last):
File "peppymeter.py", line 290, in <module>
  pm.init_display()
File "peppymeter.py", line 150, in init_display
  pygame.display.init()
pygame.error: Unable to open mouse"
 
please try this: in the
Code:
/home/pi/PeppyMeter/config.txt
instead of
Code:
mouse.device = /dev/input/event0

please try to modify in
Code:
mouse.device = /dev/input/mice

And let us know.
Best regards,
Francesco
Reply
Photo 
When I run 

Code:
cd /home/pi/PeppyMeter
sudo python3 peppymeter.py

The screen are displayed the VU meter when I run this code on Putty but after reboot the screen doesn't work. I try the code on putty again and it show the graphic a gain.

Seem the graphic doesn't fit my screen
   
Reply
Hello lhkp0480,
as reported on the PeppyMeter documentation, the available resolutions are:
Code:
UI is available in four resolutions 1280x400, 800x480, 480x320 and 320x240 pixels.

If you like: you can fill your display with static contents like I have done:

   

To do that you have to modify one set of the basic meters of PeppyMeter; in my case I have modified the 
Code:
blue-2-fgr.png
blue-2-bgr.png
in the folder  "large" that fits better my display.

The modified contents are:
   
    .

For the issue related to the screen that doesn't appear after reboot: it is normal: the PeppyMeter is a program that you have to run.
You can try to automatically start the program with a service or in other manner.
I did it with a program in Python and a service: please find them below:

.zip   FdA_AutoPeppy.zip (Size: 1.03 KB / Downloads: 7)
I hope this helps you.
In any case, please do not hesitate to ask me for any other question.
Best regards,
Francesco
Reply
(08-06-2022, 10:25 AM)fdealexa Wrote: Hello lhkp0480,
as reported on the PeppyMeter documentation, the available resolutions are:
Code:
UI is available in four resolutions 1280x400, 800x480, 480x320 and 320x240 pixels.

If you like: you can fill your display with static contents like I have done:



To do that you have to modify one set of the basic meters of PeppyMeter; in my case I have modified the 
Code:
blue-2-fgr.png
blue-2-bgr.png
in the folder  "large" that fits better my display.

The modified contents are:

.

For the issue related to the screen that doesn't appear after reboot: it is normal: the PeppyMeter is a program that you have to run.
You can try to automatically start the program with a service or in other manner.
I did it with a program in Python and a service: please find them below:

I hope this helps you.
In any case, please do not hesitate to ask me for any other question.
Best regards,
Francesco
Many thank for explanations but I don't know what need to do with your file to enable auto start of PeppyMeter. Could you guide me in detail?
I need to complete the automatic start before going to modify the background picture.
Reply
Hello lhkp0480,
Let's try:

# Enable "Metadata File" (ON) in System Config - Local Services

# Copy the files FdA_AutoPeppy in to the PeppyMeter directory (/home/pi/PeppyMeter)

Then:
Code:
sudo cp /home/pi/PeppyMeter/fda_autopeppy.service /etc/systemd/system/
sudo chmod +111 /etc/systemd/system/fda_autopeppy.service
sudo systemctl daemon-reload
sudo systemctl enable fda_autopeppy.service
sudo systemctl start fda_autopeppy.service
# Reboot the system
The PeppyMeter will start at the first "play".
Let me know if any problem.

Best regards,
Francesco
Reply
ok. To make peppymeter work WITH and AFTER camilladsp you do this:

No loopback , you don't need it and do not change anything in moodeaudio playerlib.php.

in /etc/asound.conf change slave.pcm to plughw:0,0 (so we keep moodeaudio magic working)

pcm.peppyalsa {
       type meter
       slave.pcm "plughw:0,0"
       scopes.0 peppyalsa
}
   

in camilladsp tab, example:
configuration -> flat, default device NO, click SAVE at the top.
   

enable status, expert mode and open pipeline editor.
   

Change Playback device, device -> peppyalsa , click Files at the top left and save config to flat.yml

   

reboot... it is working ?? yes it is
   

you can then start peppymeter with your actual config

cd ~/PeppyMeter/
DISPLAY=:0 python3 peppymeter.py

@fdealexa  Thank you for your detailed install instructions.
Reply


Forum Jump: