You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, big fan of the project. I am using my lights as a main light (work mode) and a "party mode" light. I have software (voice-meter) on my PC to allow audio to be sent to the PI, I need the PI to detect what mode I'm in (e.g. If playing sound run a smooth rainbow, else run party light config)
Any part of the program I can edit to add this feature or does it already exist?
I have edited the original scott lawson program to allow this so will just be as simple as adding this quick function I put together (I don't mind using the inbuilt editor but was struggling to recreate the effect) , but I prefer the UI and look of this bit of software so opted to use this.
def wheel(pos):
"""Generate rainbow colors across 0-255 positions."""
if pos < 85:
r = pos * 3
g = 255 - pos * 3
b = 0
return (r,g,b)
elif pos < 170:
pos -= 85
r = 255 - pos * 3
g = 0
b = pos * 3
return (r,g,b)
else:
pos -= 170
r = 0
g = pos * 3
b = 255 - pos * 3
return (r,g,b)
def visualize_uniformCycle(y):
"""Effect that uniformly cycles across the colour spectrum"""
global p_full
global count
# Request color based on position
r,g,b = wheel(int(count * 256 / config.N_PIXELS) & 255)
# Scrolling effect window
p_full[:, 1:] = p_full[:, :-1]
p_full[0, 0] = r
p_full[1, 0] = g
p_full[2, 0] = b
# Update the LED strip
count += 1
if count > config.N_PIXELS:
count = 0
return (p_full)
The text was updated successfully, but these errors were encountered:
Hello, big fan of the project. I am using my lights as a main light (work mode) and a "party mode" light. I have software (voice-meter) on my PC to allow audio to be sent to the PI, I need the PI to detect what mode I'm in (e.g. If playing sound run a smooth rainbow, else run party light config)
Any part of the program I can edit to add this feature or does it already exist?
I have edited the original scott lawson program to allow this so will just be as simple as adding this quick function I put together (I don't mind using the inbuilt editor but was struggling to recreate the effect) , but I prefer the UI and look of this bit of software so opted to use this.
The text was updated successfully, but these errors were encountered: