Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

How to use pivumeter alongside the python phatbeat library? #30

Closed
pirateradiohack opened this issue Jun 23, 2019 · 2 comments
Closed

Comments

@pirateradiohack
Copy link

When I try to use the phatbeat python library by setting some pixels (as documented here http://docs.pimoroni.com/phatbeat/) while playing music with pivumeter installed on my phatbeat, I can only see some random pixels (even when I set only 1 pixel) briefly flashing.
I can send the exact same command several times and witness how different random pixels flash briefly.
Even when using the VLC project. The play / pause button has the clear function used (https://github.com/pimoroni/phat-beat/blob/master/projects/vlc-radio/phatbeatd/usr/bin/phatbeatd). When I play pause I can see how the vumeter disappear and also a random flash of some random colours appear, at pause, and play.

I have to stop the pulseaudio.service in order to shutdown pivumeter before I can use the phatbeat python library as expected.

I would really like to keep the vumeter going and also at the same time insert some other user interfaces through the use of the LEDs with the python library.
Is that possible?
Can I use pivumter only on 1 LED channel and free the other channel of the phatbeat to use with the python library?

Thanks!

@Gadgetoid
Copy link
Member

Poor PiVuMeter sort of got left by the wayside due to some unresolved issues that didn't make it quite ready to push hard. However I did have a devel branch with a PR that provides a "socket" output for Pi VU Meter - #15

This is relevant because you can use Pi VU Meter in "socket" mode and then write all the display code in Python like so: https://github.com/pimoroni/pivumeter/blob/f0e333230fc6e83b992eda0d4df432998cd65fdc/python_server/examples/phatbeat-server.py

That now means that you can mix your Python user code and Pi VU Meter code and switch between manual display/VU display, or mix/match as you see fit.

@pirateradiohack
Copy link
Author

that sounds quite promising indeed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants