Hi, I am attempting to control an analog rgb strip via serial as described here in the receiving data on arduino section.
derivative.ca/wiki088/index. … le=Arduino
I am able to send a string via chop execute and everything works fine :
def valueChange(channel, sampleIndex, val, prev):
op(‘serial1’).send(‘255 0 255’ , terminator=“\n”)
I’d like to use rgb values from a toptochop but it does not work when i try to send values from a toptochop index, although i converted them to strings:
r=int(op('topto1')[0])
b=int(op('topto1')[1])
g=int(op('topto1')[2])
r2=str(r)
g2=str(g)
b2=str(b)
Im pretty noob at this but the textport prints the correct rgb values within touch. Printing to the serial shows that the variables are correct when I enter a string like ‘255 0 255’ but not when it is a converted string.
Any Ideas?
Thanks