pimoroni / phat-beat

Python library for PHAT BEAT - A stereo DAC, AMP and VU for the Raspberry Pi
https://shop.pimoroni.com/products/phat-beat
MIT License
99 stars 28 forks source link

PhatBeat - Change colors of led display #19

Closed eat-sleep-code closed 4 years ago

eat-sleep-code commented 5 years ago

I have setup the PhatBeat to play audio via Airplay using your tutorial: http://learn.pimoroni.com/tutorial/sandyj/streaming-airplay-to-your-pi

Is it possible to change the colors of the vu-meter with this setup? I would like to go from white to blue (instead of green to red).

eat-sleep-code commented 5 years ago

ANyone?

memm74 commented 5 years ago

@eat-sleep-code I just got mine recently and have only tried vlcradio so far, but it looks as if you can set the colour using phatbeat.set_pixel(x, r, g, b, channel=channel) have a look in init.py, line 260+

Gadgetoid commented 4 years ago

Behind the scenes the VU Meter is provided by pivumeter which is available here - https://github.com/pimoroni/pivumeter

It's been a long time since I touched this code, but always intended to migrate the actual VU display code into Python so it's easier for users to tinker with. There's a pending PR with this here- https://github.com/pimoroni/pivumeter/pull/15

Unfortunately between the relative complexity of accomplishing this, and my unfamiliarity with my almost-three-year-old code (good grief), it's not going to be an easy task to walk you through the steps. But, do let me know if you're still trying to customise it.