Handling Parameters

All the topics related to QLC+ on the Raspberry Pi
Post Reply
biffboff
Posts: 3
Joined: Wed Nov 08, 2017 3:02 pm
Real Name: Biffer Rowley

Hi i have a Python script sending some values from an external sensor over OSC.

How can i for example retrieve parameters within QLC. I want to send over RGB values from this sensor & then pick them up and set the RGB of my lights.

Thanks in advance!
biffboff
Posts: 3
Joined: Wed Nov 08, 2017 3:02 pm
Real Name: Biffer Rowley

Ok I'm going to answer this myself. Rather cleverly QLC picks up on these. So i just need to map each slider & we're good!


Love QLC :)

apds.enableLightSensor()
oval = -1
red = -1
green = -1
blue = -1

while True:
sleep(0.25)
val = apds.readAmbientLight()
red = apds.readRedLight()
green = apds.readGreenLight()
blue= apds.readBlueLight()
print(red, ": ",blue, ":",green);
if val != oval:
oval = val
try:
target = liblo.Address(7700)
except liblo.AddressError, err:
print str(err)
sys.exit()

liblo.send(target, "green", green);
liblo.send(target, "red", red);
liblo.send(target, "blue", blue);

finally:
GPIO.cleanup()
print "Bye"
Post Reply